Răsfoiți Sursa

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

* WebGLRenderer: Improve rough reflection mixing for IBL.

* Use pow4() and inline.
mrdoob 7 luni în urmă
părinte
comite
b2c3aeff32

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
build/three.cjs


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
build/three.module.js


Fișier diff suprimat deoarece este prea mare
+ 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 );
 

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff

粤ICP备19079148号