diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-08-27 13:23:10 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-08-27 13:23:28 +0400 |
commit | 4f4997cb0386de5d3d2b2d8f41c9d6f9078e5910 (patch) | |
tree | 3b450a0c4d271a0a62c71ae9df2410f317f7a197 | |
parent | 3f2cf6da6f53f1969755dd26b92ab19719e6f00a (diff) |
Disable clipping on ATI cards not supporting the clipping workaround to
avoid software fallback.
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_simple_vert.glsl | 2 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_vertex.glsl | 2 |
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; |