瀏覽代碼

Merge pull request #2089 from bghgary/bump-normal-fix

Fix bugs with bump map and normal in pbr shader
David Catuhe 8 年之前
父節點
當前提交
8924a09f04
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 4 0
      src/Shaders/ShadersInclude/pbrFragmentDeclaration.fx
  2. 1 1
      src/Shaders/pbr.fragment.fx

+ 4 - 0
src/Shaders/ShadersInclude/pbrFragmentDeclaration.fx

@@ -34,6 +34,10 @@ uniform vec2 vAlbedoInfos;
 uniform vec3 vAmbientInfos;
 #endif
 
+#ifdef BUMP
+uniform vec3 vBumpInfos;
+#endif
+
 #ifdef OPACITY	
 uniform vec2 vOpacityInfos;
 #endif

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

@@ -1,4 +1,4 @@
-#ifdef BUMP
+#if defined(BUMP)|| !defined(NORMAL)
 #extension GL_OES_standard_derivatives : enable
 #endif