Blender Git Loki

Git Commits -> Revision 4097f9c

Revision 4097f9c by Antonis Ryakiotakis (master)
July 11, 2014, 16:17 (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: 4097f9c3c48bcf2df25451c1003f43e8fc0154f3
Parent Commit: 1aabbf8
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