Преглед изворни кода

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;
 uniform vec3 vAmbientInfos;
 #endif
 #endif
 
 
+#ifdef BUMP
+uniform vec3 vBumpInfos;
+#endif
+
 #ifdef OPACITY	
 #ifdef OPACITY	
 uniform vec2 vOpacityInfos;
 uniform vec2 vOpacityInfos;
 #endif
 #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
 #extension GL_OES_standard_derivatives : enable
 #endif
 #endif