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

Workaround for OpenGL terrain blend on Intel drivers.

LuisAntonRebollo пре 10 година
родитељ
комит
cf195152d6

+ 1 - 2
Templates/Empty/game/shaders/common/terrain/terrain.glsl

@@ -35,8 +35,7 @@ float calcBlend( float texId, vec2 layerCoord, float layerSize, vec4 layerSample
    // match the current texture id.
    vec4 factors = vec4(0);
    for(int i = 0; i < 4; i++)
-      if(layerSample[i] == texId)
-         factors[i] = 1;
+      factors[i] = (layerSample[i] == texId) ? 1 : 0; // workaround for Intel
  
    // This is a custom bilinear filter.
 

+ 1 - 2
Templates/Full/game/shaders/common/terrain/terrain.glsl

@@ -35,8 +35,7 @@ float calcBlend( float texId, vec2 layerCoord, float layerSize, vec4 layerSample
    // match the current texture id.
    vec4 factors = vec4(0);
    for(int i = 0; i < 4; i++)
-      if(layerSample[i] == texId)
-         factors[i] = 1;
+      factors[i] = (layerSample[i] == texId) ? 1 : 0; // workaround for Intel
  
    // This is a custom bilinear filter.