WestLangley %!s(int64=6) %!d(string=hai) anos
pai
achega
2712f3dc0a
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/renderers/shaders/ShaderLib/meshphysical_frag.glsl.js

+ 3 - 1
src/renderers/shaders/ShaderLib/meshphysical_frag.glsl.js

@@ -111,7 +111,9 @@ void main() {
 	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
 
 	// this is a stub for the transparency model
-	diffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );
+	#ifdef TRANSPARENCY
+		diffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );
+	#endif
 
 	gl_FragColor = vec4( outgoingLight, diffuseColor.a );