Przeglądaj źródła

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

* WebGLRenderer: Improve rough reflection mixing for IBL.

* Use pow4() and inline.
mrdoob 7 miesięcy temu
rodzic
commit
b2c3aeff32

Plik diff jest za duży
+ 0 - 0
build/three.cjs


Plik diff jest za duży
+ 0 - 0
build/three.module.js


Plik diff jest za duży
+ 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 );
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików

粤ICP备19079148号