1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Rendering: Fix Math constant conversion

This commit is contained in:
Thaddeus Crews
2025-04-11 12:32:46 -05:00
parent 7b9c5122fa
commit c7e9dc96a4
7 changed files with 30 additions and 30 deletions

View File

@@ -205,9 +205,9 @@ void Fog::init_fog_shader(uint32_t p_max_directional_lights, int p_roughness_lay
ShaderCompiler::DefaultIdentifierActions actions;
actions.renames["TIME"] = "scene_params.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["WORLD_POSITION"] = "world.xyz";
actions.renames["OBJECT_POSITION"] = "params.position";
actions.renames["UVW"] = "uvw";

View File

@@ -783,9 +783,9 @@ void SkyRD::init() {
actions.renames["SCREEN_UV"] = "uv";
actions.renames["FRAGCOORD"] = "gl_FragCoord";
actions.renames["TIME"] = "params.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["HALF_RES_COLOR"] = "half_res_color";
actions.renames["QUARTER_RES_COLOR"] = "quarter_res_color";
actions.renames["RADIANCE"] = "radiance";