summaryrefslogtreecommitdiffstats
path: root/servers
diff options
context:
space:
mode:
authorjsjtxietian <jsjtxietian@outlook.com>2024-08-15 11:44:11 +0800
committerRémi Verschelde <rverschelde@gmail.com>2024-09-16 16:42:01 +0200
commitb84dbab84d1913934f0e301b137cc6892666813c (patch)
treeea36f0dc58f7f14f72ed26e43e7f9daae47ed89d /servers
parent1ebf488a4ec8e0a372a6097e7e90b78d47fca5b5 (diff)
downloadredot-engine-b84dbab84d1913934f0e301b137cc6892666813c.tar.gz
Fix undefined `alpha_scissor` in standard shader
(cherry picked from commit 970a237c203cd9a373b1846aa029effd2e4a288d)
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl2
2 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
index 4a630b0b0a..67ee84b01b 100644
--- a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
+++ b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
@@ -2242,7 +2242,7 @@ void fragment_shader(in SceneData scene_data) {
alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0));
#if defined(ALPHA_SCISSOR_USED)
- if (alpha < alpha_scissor) {
+ if (alpha < alpha_scissor_threshold) {
discard;
}
#endif // ALPHA_SCISSOR_USED
diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl
index 530a7a37db..24568d7e94 100644
--- a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl
+++ b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl
@@ -1765,7 +1765,7 @@ void main() {
alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0));
#if defined(ALPHA_SCISSOR_USED)
- if (alpha < alpha_scissor) {
+ if (alpha < alpha_scissor_threshold) {
discard;
}
#endif // !ALPHA_SCISSOR_USED