浏览代码

add clearCoatNormal context only to physical

sunag 6 年之前
父节点
当前提交
f5110b235b
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/renderers/shaders/ShaderChunk/common.glsl.js

+ 2 - 0
src/renderers/shaders/ShaderChunk/common.glsl.js

@@ -39,7 +39,9 @@ struct GeometricContext {
 	vec3 position;
 	vec3 normal;
 	vec3 viewDir;
+#ifdef PHYSICAL
 	vec3 clearCoatNormal;
+#endif
 };
 
 vec3 transformDirection( in vec3 dir, in mat4 matrix ) {