summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-05-01 23:47:46 +0200
committerGitHub <noreply@github.com>2024-05-01 23:47:46 +0200
commitf91db3dc58f1d6a0cb63d591515183b5a45cd3ba (patch)
tree3c0f467d5178d325986f3f36cb9af2fc6d06e7b4 /drivers
parent92e726d8dc27d9f9b377224d6fa776b0d42ca5c2 (diff)
parente41064388e67cc9bec320ee467757089b150bf20 (diff)
downloadredot-engine-f91db3dc58f1d6a0cb63d591515183b5a45cd3ba.tar.gz
Merge pull request #91399 from QbieShay/qbe/fix-pmul-name
Revert premul alpha to spell without the T
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/shaders/scene.glsl12
-rw-r--r--drivers/gles3/storage/material_storage.cpp4
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 22d72337b9..0c6a048af6 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1442,9 +1442,9 @@ void main() {
float clearcoat_roughness = 0.0;
float anisotropy = 0.0;
vec2 anisotropy_flow = vec2(1.0, 0.0);
-#ifdef PREMULT_ALPHA_USED
- float premult_alpha = 1.0;
-#endif
+#ifdef PREMUL_ALPHA_USED
+ float premul_alpha = 1.0;
+#endif PREMUL_ALPHA_USED
#ifndef FOG_DISABLED
vec4 fog = vec4(0.0);
#endif // !FOG_DISABLED
@@ -2149,7 +2149,7 @@ void main() {
#endif // !RENDER_MATERIAL
#endif // !MODE_RENDER_DEPTH
-#ifdef PREMULT_ALPHA_USED
- frag_color.rgb *= premult_alpha;
-#endif
+#ifdef PREMUL_ALPHA_USED
+ frag_color.rgb *= premul_alpha;
+#endif PREMUL_ALPHA_USED
}
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 808e05e60a..996c205042 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -1243,7 +1243,7 @@ MaterialStorage::MaterialStorage() {
actions.renames["NORMAL_MAP_DEPTH"] = "normal_map_depth";
actions.renames["ALBEDO"] = "albedo";
actions.renames["ALPHA"] = "alpha";
- actions.renames["PREMULT_ALPHA_FACTOR"] = "premult_alpha";
+ actions.renames["PREMUL_ALPHA_FACTOR"] = "premul_alpha";
actions.renames["METALLIC"] = "metallic";
actions.renames["SPECULAR"] = "specular";
actions.renames["ROUGHNESS"] = "roughness";
@@ -2906,7 +2906,7 @@ void SceneShaderData::set_code(const String &p_code) {
actions.render_mode_values["blend_mix"] = Pair<int *, int>(&blend_modei, BLEND_MODE_MIX);
actions.render_mode_values["blend_sub"] = Pair<int *, int>(&blend_modei, BLEND_MODE_SUB);
actions.render_mode_values["blend_mul"] = Pair<int *, int>(&blend_modei, BLEND_MODE_MUL);
- actions.render_mode_values["blend_premult_alpha"] = Pair<int *, int>(&blend_modei, BLEND_MODE_PREMULT_ALPHA);
+ actions.render_mode_values["blend_premul_alpha"] = Pair<int *, int>(&blend_modei, BLEND_MODE_PREMULT_ALPHA);
actions.render_mode_values["alpha_to_coverage"] = Pair<int *, int>(&alpha_antialiasing_modei, ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE);
actions.render_mode_values["alpha_to_coverage_and_one"] = Pair<int *, int>(&alpha_antialiasing_modei, ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE);