Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-08-27 13:23:10 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-08-27 13:23:28 +0400
commit4f4997cb0386de5d3d2b2d8f41c9d6f9078e5910 (patch)
tree3b450a0c4d271a0a62c71ae9df2410f317f7a197 /source/blender/gpu/shaders
parent3f2cf6da6f53f1969755dd26b92ab19719e6f00a (diff)
Disable clipping on ATI cards not supporting the clipping workaround to
avoid software fallback.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_simple_vert.glsl2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_vertex.glsl2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_simple_vert.glsl b/source/blender/gpu/shaders/gpu_shader_simple_vert.glsl
index e094f22637b..8ccd0feb5e2 100644
--- a/source/blender/gpu/shaders/gpu_shader_simple_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_simple_vert.glsl
@@ -37,7 +37,7 @@ void main()
int i;
for(i = 0; i < 6; i++)
gl_ClipDistance[i] = dot(co, gl_ClipPlane[i]);
-#else
+#elif !defined(GPU_ATI)
// Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA
// graphic cards, while on ATI it can cause a software fallback.
gl_ClipVertex = co;
diff --git a/source/blender/gpu/shaders/gpu_shader_vertex.glsl b/source/blender/gpu/shaders/gpu_shader_vertex.glsl
index 96ce00e214f..b5d8dcc0f35 100644
--- a/source/blender/gpu/shaders/gpu_shader_vertex.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_vertex.glsl
@@ -18,7 +18,7 @@ void main()
int i;
for(i = 0; i < 6; i++)
gl_ClipDistance[i] = dot(co, gl_ClipPlane[i]);
-#else
+#elif !defined(GPU_ATI)
// Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA
// graphic cards, while on ATI it can cause a software fallback.
gl_ClipVertex = co;