浏览代码

Merge pull request #8005 from Popov72/master

Fix bug with sheen when no reflection and not using sheen.roughness
David Catuhe 5 年之前
父节点
当前提交
0c01fb9995
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/Shaders/ShadersInclude/pbrBlockSheen.fx
  2. 1 1
      src/Shaders/pbr.fragment.fx

+ 1 - 1
src/Shaders/ShadersInclude/pbrBlockSheen.fx

@@ -38,6 +38,7 @@
     #endif
     #ifdef ENVIRONMENTBRDF
         const in float NdotV,
+        const in vec3 environmentBrdf,
     #endif
     #if defined(REFLECTION) && defined(ENVIRONMENTBRDF)
         const in vec2 AARoughnessFactors,
@@ -57,7 +58,6 @@
             const in sampler2D reflectionSamplerLow,
             const in sampler2D reflectionSamplerHigh,
         #endif
-        const in vec3 environmentBrdf,
         #if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION)
             const in float seo,
         #endif

+ 1 - 1
src/Shaders/pbr.fragment.fx

@@ -261,6 +261,7 @@ void main(void) {
         #endif
         #ifdef ENVIRONMENTBRDF
             NdotV,
+            environmentBrdf,
         #endif
         #if defined(REFLECTION) && defined(ENVIRONMENTBRDF)
             AARoughnessFactors,
@@ -275,7 +276,6 @@ void main(void) {
                 reflectionSamplerLow,
                 reflectionSamplerHigh,
             #endif
-            environmentBrdf,
             #if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION)
                 seo,
             #endif