Commit: 4f4997cb0386de5d3d2b2d8f41c9d6f9078e5910
Author: Antony Riakiotakis
Date:   Wed Aug 27 11:23:10 2014 +0200
Branches: master
https://developer.blender.org/rB4f4997cb0386de5d3d2b2d8f41c9d6f9078e5910

Disable clipping on ATI cards not supporting the clipping workaround to
avoid software fallback.

===================================================================

M       source/blender/gpu/shaders/gpu_shader_simple_vert.glsl
M       source/blender/gpu/shaders/gpu_shader_vertex.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_simple_vert.glsl 
b/source/blender/gpu/shaders/gpu_shader_simple_vert.glsl
index e094f22..8ccd0fe 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 96ce00e..b5d8dcc 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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to