Blender Git Loki

Git Commits -> Revision 638c1e1

Revision 638c1e1 by Antonis Ryakiotakis (soc-2013-paint)
July 12, 2014, 09:51 (GMT)
Another attempt for T40981, clipping border does not work with GLSL on
ATIs.

This is actually a test to see if this can be enabled on ATI cards.
According to various sources, newer ATI cards supporting GLSL 3.0
support gl_ClippingDistance in shaders, which is the forward compatible
way to do custom clipping.

This fix will bind 6 additional varying variables on ATIs, which may
lead to some shaders not compiling due to limiting out of those
variables, or to performance degradation. Also I do not have an ATI
handy to test.

Having those in mind, this commit may well be reverted later.

Clipping planes are usually 4 (6 is for cube clipping), but making
shaders depend on viewport state is really bad, and would lead to
recompilation, so I took the worst case here to avoid that.
Hopefully driver does some optimization there.

Commit Details:

Full Hash: 638c1e19beddac97816c01471b88f5d5056d11ac
Parent Commit: a4b24a6
Committed By: Campbell Barton
Lines Changed: +59, -20

3 Modified Paths:

/source/blender/gpu/intern/gpu_extensions.c (+39, -16) (Diff)
/source/blender/gpu/shaders/gpu_shader_simple_vert.glsl (+10, -2) (Diff)
/source/blender/gpu/shaders/gpu_shader_vertex.glsl (+10, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021