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;