浏览代码

ifdef fix

WestLangley 6 年之前
父节点
当前提交
2712f3dc0a
共有 1 个文件被更改,包括 3 次插入1 次删除
  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 );