浏览代码

Fix WebGL1 unit tests fail

Popov72 5 年之前
父节点
当前提交
517ae0a02c
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      src/Shaders/ShadersInclude/pbrBlockSheen.fx
  2. 2 0
      src/Shaders/pbr.fragment.fx

+ 2 - 0
src/Shaders/ShadersInclude/pbrBlockSheen.fx

@@ -21,7 +21,9 @@
 
 
     void sheenBlock(
     void sheenBlock(
         const in vec4 vSheenColor,
         const in vec4 vSheenColor,
+    #ifdef SHEEN_ROUGHNESS
         const in float vSheenRoughness,
         const in float vSheenRoughness,
+    #endif
         const in float roughness,
         const in float roughness,
     #ifdef SHEEN_TEXTURE
     #ifdef SHEEN_TEXTURE
         const in vec2 vSheenUV,
         const in vec2 vSheenUV,

+ 2 - 0
src/Shaders/pbr.fragment.fx

@@ -244,7 +244,9 @@ void main(void) {
 
 
         sheenBlock(
         sheenBlock(
             vSheenColor,
             vSheenColor,
+        #ifdef SHEEN_ROUGHNESS
             vSheenRoughness,
             vSheenRoughness,
+        #endif
             roughness,
             roughness,
         #ifdef SHEEN_TEXTURE
         #ifdef SHEEN_TEXTURE
             vSheenUV,
             vSheenUV,