Parcourir la source

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

* WebGLRenderer: Improve rough reflection mixing for IBL.

* Use pow4() and inline.
mrdoob il y a 6 mois
Parent
commit
b2c3aeff32

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/three.cjs


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/three.module.js


Fichier diff supprimé car celui-ci est trop grand
+ 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 );
 			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 );
 
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff

粤ICP备19079148号