Browse Source

WebGLRenderer: Improve rough reflection mixing for IBL (#32102)

* WebGLRenderer: Improve rough reflection mixing for IBL.

* Use pow4() and inline.
mrdoob 5 months ago
parent
commit
b2c3aeff32

File diff suppressed because it is too large
+ 0 - 0
build/three.cjs


File diff suppressed because it is too large
+ 0 - 0
build/three.module.js


File diff suppressed because it is too large
+ 0 - 0
build/three.module.min.js


+ 1 - 1
src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js

@@ -26,7 +26,7 @@ export default /* glsl */`
 			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.
-			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
+			reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );
 
 			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
 

Some files were not shown because too many files changed in this diff

粤ICP备19079148号