Backported: [3.x] Fix NODE_POSITION_VIEW Shader Built-In

- paddy-exe
67d3fe4075
This commit is contained in:
Relintai 2023-06-11 09:38:19 +02:00
parent 552226ab5d
commit c46c527f01

View File

@ -1161,7 +1161,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
actions[RS::SHADER_SPATIAL].renames["NODE_POSITION_WORLD"] = "world_transform[3].xyz";
actions[RS::SHADER_SPATIAL].renames["CAMERA_POSITION_WORLD"] = "camera_matrix[3].xyz";
actions[RS::SHADER_SPATIAL].renames["CAMERA_DIRECTION_WORLD"] = "camera_inverse_matrix[3].xyz";
actions[RS::SHADER_SPATIAL].renames["NODE_POSITION_VIEW"] = "(world_transform * camera_inverse_matrix)[3].xyz";
actions[RS::SHADER_SPATIAL].renames["NODE_POSITION_VIEW"] = "(camera_inverse_matrix * world_transform)[3].xyz";
//for light
actions[RS::SHADER_SPATIAL].renames["VIEW"] = "view";