From 8c28b60125942540c031eb9beeb661915e0e4815 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 14 Feb 2023 11:15:02 +0100 Subject: [PATCH] Follow-up of d02dd9a3b5edc5668fb8535483f91bf3f87cd548 - Fixed rendering of modifiers in Cut Gizmo --- resources/shaders/110/gouraud.fs | 6 ++++-- resources/shaders/140/gouraud.fs | 6 ++++-- resources/shaders/ES/gouraud.fs | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/resources/shaders/110/gouraud.fs b/resources/shaders/110/gouraud.fs index b9fa52bde..21ca4d6d2 100644 --- a/resources/shaders/110/gouraud.fs +++ b/resources/shaders/110/gouraud.fs @@ -52,8 +52,10 @@ void main() discard; vec4 color; - if (use_color_clip_plane) - color = (color_clip_plane_dot < 0.0) ? uniform_color_clip_plane_1 : uniform_color_clip_plane_2; + if (use_color_clip_plane) { + color.rgb = (color_clip_plane_dot < 0.0) ? uniform_color_clip_plane_1.rgb : uniform_color_clip_plane_2.rgb; + color.a = uniform_color.a; + } else color = uniform_color; diff --git a/resources/shaders/140/gouraud.fs b/resources/shaders/140/gouraud.fs index f14bd5b86..44851a4de 100644 --- a/resources/shaders/140/gouraud.fs +++ b/resources/shaders/140/gouraud.fs @@ -54,8 +54,10 @@ void main() discard; vec4 color; - if (use_color_clip_plane) - color = (color_clip_plane_dot < 0.0) ? uniform_color_clip_plane_1 : uniform_color_clip_plane_2; + if (use_color_clip_plane) { + color.rgb = (color_clip_plane_dot < 0.0) ? uniform_color_clip_plane_1.rgb : uniform_color_clip_plane_2.rgb; + color.a = uniform_color.a; + } else color = uniform_color; diff --git a/resources/shaders/ES/gouraud.fs b/resources/shaders/ES/gouraud.fs index 736968664..ddc2e0718 100644 --- a/resources/shaders/ES/gouraud.fs +++ b/resources/shaders/ES/gouraud.fs @@ -54,8 +54,10 @@ void main() discard; vec4 color; - if (use_color_clip_plane) - color = (color_clip_plane_dot < 0.0) ? uniform_color_clip_plane_1 : uniform_color_clip_plane_2; + if (use_color_clip_plane) { + color.rgb = (color_clip_plane_dot < 0.0) ? uniform_color_clip_plane_1.rgb : uniform_color_clip_plane_2.rgb; + color.a = uniform_color.a; + } else color = uniform_color;