summaryrefslogtreecommitdiff
path: root/drivers/gles3/storage
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-14 11:08:35 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-14 11:08:35 +0100
commit63cded6a857158bbee405d177a711c9e55f002ba (patch)
tree02bcc55c2156933981d12e4aea9c34a10a5b0b2c /drivers/gles3/storage
parent1b3ed1b3baa442c090981e3880f15d68d44bfbf3 (diff)
parent5d9e996f682e4d6c54c0cdce06d68abb2fb4193f (diff)
Merge pull request #61884 from Calinou/alpha-hash-use-opaque-pipeline
Use opaque rendering pipeline for alpha hash materials
Diffstat (limited to 'drivers/gles3/storage')
-rw-r--r--drivers/gles3/storage/material_storage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 6748eb3676..2d6a793c9e 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -3358,6 +3358,9 @@ void SceneShaderData::set_code(const String &p_code) {
actions.usage_flag_pointers["ALPHA"] = &uses_alpha;
actions.usage_flag_pointers["ALPHA_SCISSOR_THRESHOLD"] = &uses_alpha_clip;
+ // Use alpha clip pipeline for alpha hash/dither.
+ // This prevents sorting issues inherent to alpha blending and allows such materials to cast shadows.
+ actions.usage_flag_pointers["ALPHA_HASH_SCALE"] = &uses_alpha_clip;
actions.render_mode_flags["depth_prepass_alpha"] = &uses_depth_pre_pass;
actions.usage_flag_pointers["SSS_STRENGTH"] = &uses_sss;