diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 873df7284..d29e8ad4a 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -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";