Browse Source

Merge pull request #1028 from AtomicGameEngine/JME-ATOMIC-GLESSHADOWFIX

Fixing shadow issue on NVIDIA Shield via https://github.com/urho3d/Urho3D/issues/1607, thanks @cadaver!
JoshEngebretson 9 years ago
parent
commit
26db02ad6d
1 changed files with 6 additions and 2 deletions
  1. 6 2
      Resources/CoreData/Shaders/GLSL/Lighting.glsl

+ 6 - 2
Resources/CoreData/Shaders/GLSL/Lighting.glsl

@@ -298,7 +298,7 @@ float GetDirShadow(const vec4 iShadowPos[NUMCASCADES], float depth)
     return GetDirShadowFade(GetShadow(shadowPos), depth);
 }
 #else
-float GetDirShadow(const vec4 iShadowPos[NUMCASCADES], float depth)
+float GetDirShadow(const highp vec4 iShadowPos[NUMCASCADES], float depth)
 {
     return GetDirShadowFade(GetShadow(iShadowPos[0]), depth);
 }
@@ -335,7 +335,11 @@ float GetDirShadowDeferred(vec4 projWorldPos, vec3 normal, float depth)
 #endif
 #endif
 
-float GetShadow(vec4 iShadowPos[NUMCASCADES], float depth)
+#ifndef GL_ES
+float GetShadow(const vec4 iShadowPos[NUMCASCADES], float depth)
+#else
+float GetShadow(const highp vec4 iShadowPos[NUMCASCADES], float depth)
+#endif
 {
     #if defined(DIRLIGHT)
         return GetDirShadow(iShadowPos, depth);