Added math constants to texture-blit

Fixes #118144

Fixed an issue where texture-blit shader was failing to compile when using some math constants because the code was incorrectly passing name strings into the shader
This commit is contained in:
Altay Evren Özsan
2026-04-03 19:18:10 +03:00
parent 3911e0963d
commit d18e225ba5
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -1573,9 +1573,9 @@ MaterialStorage::MaterialStorage() {
ShaderCompiler::DefaultIdentifierActions actions;
actions.renames["TIME"] = "time";
actions.renames["PI"] = _MKSTR(Math_PI);
actions.renames["TAU"] = _MKSTR(Math_TAU);
actions.renames["E"] = _MKSTR(Math_E);
actions.renames["PI"] = String::num(Math::PI);
actions.renames["TAU"] = String::num(Math::TAU);
actions.renames["E"] = String::num(Math::E);
actions.renames["FRAGCOORD"] = "gl_FragCoord";
@@ -659,9 +659,9 @@ void TextureStorage::_tex_blit_shader_initialize() {
ShaderCompiler::DefaultIdentifierActions actions;
actions.renames["TIME"] = "data.time";
actions.renames["PI"] = _MKSTR(Math_PI);
actions.renames["TAU"] = _MKSTR(Math_TAU);
actions.renames["E"] = _MKSTR(Math_E);
actions.renames["PI"] = String::num(Math::PI);
actions.renames["TAU"] = String::num(Math::TAU);
actions.renames["E"] = String::num(Math::E);
actions.renames["FRAGCOORD"] = "gl_FragCoord";