소스 검색

Workaround for OpenGL terrain blend on Intel drivers.

LuisAntonRebollo 10 년 전
부모
커밋
cf195152d6
2개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 2
      Templates/Empty/game/shaders/common/terrain/terrain.glsl
  2. 1 2
      Templates/Full/game/shaders/common/terrain/terrain.glsl

+ 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.