Explorar o código

ShaderChunk: Clearer sheen code. https://github.com/mrdoob/three.js/pull/23069#issuecomment-999982264

Mr.doob %!s(int64=3) %!d(string=hai) anos
pai
achega
820a605fdf
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/renderers/shaders/ShaderLib/meshphysical.glsl.js

+ 2 - 2
src/renderers/shaders/ShaderLib/meshphysical.glsl.js

@@ -177,9 +177,9 @@ void main() {
 
 	#ifdef USE_SHEEN
 
-		float sheen = max3( material.sheenColor );
+		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
 
-		outgoingLight = outgoingLight * ( 1.0 - 0.157 * sheen ) + sheenSpecular;
+		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;
 
 	#endif