Browse Source

Prevent attempting to compile the ColorCorrection function (uses unsupported sampler3D) on GLES.

Lasse Öörni 10 years ago
parent
commit
1d6a980136
1 changed files with 2 additions and 0 deletions
  1. 2 0
      bin/CoreData/Shaders/GLSL/PostProcess.glsl

+ 2 - 0
bin/CoreData/Shaders/GLSL/PostProcess.glsl

@@ -64,6 +64,7 @@ vec3 Uncharted2Tonemap(vec3 x)
    return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;
    return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;
 }
 }
 
 
+#ifndef GL_ES
 vec3 ColorCorrection(vec3 color, sampler3D lut)
 vec3 ColorCorrection(vec3 color, sampler3D lut)
 {
 {
     float lutSize = 16.0;
     float lutSize = 16.0;
@@ -71,6 +72,7 @@ vec3 ColorCorrection(vec3 color, sampler3D lut)
     float offset = 1.0 / (2.0 * lutSize);
     float offset = 1.0 / (2.0 * lutSize);
     return texture3D(lut, clamp(color, 0.0, 1.0) * scale + offset).rgb;
     return texture3D(lut, clamp(color, 0.0, 1.0) * scale + offset).rgb;
 }
 }
+#endif
 
 
 const float Gamma = 2.2;
 const float Gamma = 2.2;
 const float InverseGamma = 1.0 / 2.2;
 const float InverseGamma = 1.0 / 2.2;