Fix: Workbench: Shadows
Broken shadows after c0c3565714
GPU_ARB_gpu_shader5 is never defined,
since gl_InvocationID is always available.
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#ifdef GPU_ARB_gpu_shader5
|
||||
# define USE_INVOC_EXT
|
||||
#endif
|
||||
|
||||
vec4 get_pos(int v, bool backface)
|
||||
{
|
||||
return (backface) ? vData[v].backPosition : vData[v].frontPosition;
|
||||
@@ -54,12 +50,7 @@ void main()
|
||||
#endif
|
||||
|
||||
if (!is_manifold || !backface) {
|
||||
#ifdef USE_INVOC_EXT
|
||||
bool do_front = (gl_InvocationID & 1) == 0;
|
||||
emit_cap(do_front, invert);
|
||||
#else
|
||||
emit_cap(true, invert);
|
||||
emit_cap(false, invert);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#ifdef GPU_ARB_gpu_shader5
|
||||
# define USE_INVOC_EXT
|
||||
#endif
|
||||
|
||||
#define DEGENERATE_TRIS_WORKAROUND
|
||||
#define DEGENERATE_TRIS_AREA_THRESHOLD 4e-17
|
||||
|
||||
@@ -74,23 +70,13 @@ void main()
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef USE_INVOC_EXT
|
||||
if (gl_InvocationID == 0) {
|
||||
extrude_edge(backface.x);
|
||||
}
|
||||
else if (is_manifold) {
|
||||
# ifdef DOUBLE_MANIFOLD
|
||||
#ifdef DOUBLE_MANIFOLD
|
||||
/* Increment/Decrement twice for manifold edges. */
|
||||
extrude_edge(backface.x);
|
||||
# endif
|
||||
}
|
||||
#else
|
||||
extrude_edge(backface.x);
|
||||
if (is_manifold) {
|
||||
# ifdef DOUBLE_MANIFOLD
|
||||
/* Increment/Decrement twice for manifold edges. */
|
||||
extrude_edge(backface.x);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user