|
@@ -26,7 +26,7 @@ export default /* glsl */`
|
|
|
vec3 reflectVec = reflect( - viewDir, normal );
|
|
vec3 reflectVec = reflect( - viewDir, normal );
|
|
|
|
|
|
|
|
// Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane.
|
|
// Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane.
|
|
|
- reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
|
|
|
|
|
|
|
+ reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );
|
|
|
|
|
|
|
|
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
|
|
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
|
|
|
|
|
|