瀏覽代碼

Tightening of shadow related function signatures on GLES. Related to #1607.

Lasse Öörni 9 年之前
父節點
當前提交
08b083b323
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      bin/CoreData/Shaders/GLSL/Lighting.glsl

+ 6 - 2
bin/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);