Fix Incorrect Merge GPencil/Overlay shaders
Only Metal shaders where broken
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
#pragma BLENDER_REQUIRE(overlay_edit_mesh_common_lib.glsl)
|
||||
|
||||
#define DISCARD_VERTEX \
|
||||
gl_Position = geometry_out.finalColorOuter = geometry_out.finalColor = vec4(0.0); \
|
||||
geometry_out.edgeCoord = 0.0; \
|
||||
gl_Position = geometry_flat_out.finalColorOuter = geometry_out.finalColor = vec4(0.0); \
|
||||
geometry_noperspective_out.edgeCoord = 0.0; \
|
||||
return;
|
||||
|
||||
bool test_occlusion(vec4 pos)
|
||||
@@ -41,7 +41,7 @@ vec3 vec3_1010102_Inorm_to_vec3(int data)
|
||||
void do_vertex(vec4 color, vec4 pos, float coord, vec2 offset)
|
||||
{
|
||||
geometry_out.finalColor = color;
|
||||
geometry_out.edgeCoord = coord;
|
||||
geometry_noperspective_out.edgeCoord = coord;
|
||||
gl_Position = pos;
|
||||
/* Multiply offset by 2 because gl_Position range is [-1..1]. */
|
||||
gl_Position.xy += offset * 2.0 * pos.w;
|
||||
@@ -176,10 +176,10 @@ void main()
|
||||
vec2 line = ss_pos[0] - ss_pos[1];
|
||||
line = abs(line) * sizeViewport.xy;
|
||||
|
||||
geometry_out.finalColorOuter = out_finalColorOuter[0];
|
||||
geometry_flat_out.finalColorOuter = out_finalColorOuter[0];
|
||||
float half_size = sizeEdge;
|
||||
/* Enlarge edge for flag display. */
|
||||
half_size += (geometry_out.finalColorOuter.a > 0.0) ? max(sizeEdge, 1.0) : 0.0;
|
||||
half_size += (geometry_flat_out.finalColorOuter.a > 0.0) ? max(sizeEdge, 1.0) : 0.0;
|
||||
|
||||
if (do_smooth_wire) {
|
||||
/* Add 1 px for AA */
|
||||
|
||||
@@ -11,9 +11,9 @@ void do_vertex(
|
||||
vec4 pos, float selection_fac, vec2 stipple_start, vec2 stipple_pos, float coord, vec2 offset)
|
||||
{
|
||||
geom_out.selectionFac = selection_fac;
|
||||
geom_out.edgeCoord = coord;
|
||||
geom_out.stippleStart = stipple_start;
|
||||
geom_out.stipplePos = stipple_pos;
|
||||
geom_noperspective_out.edgeCoord = coord;
|
||||
geom_flat_out.stippleStart = stipple_start;
|
||||
geom_noperspective_out.stipplePos = stipple_pos;
|
||||
|
||||
gl_Position = pos;
|
||||
/* Multiply offset by 2 because gl_Position range is [-1..1]. */
|
||||
|
||||
Reference in New Issue
Block a user