Merge pull request #76226 from paddy-exe/fix-node-position-view-3.x
[3.x] Fix `NODE_POSITION_VIEW` shader built-in
This commit is contained in:
commit
d644de8088
2 changed files with 2 additions and 2 deletions
|
@ -1161,7 +1161,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
|
|||
actions[VS::SHADER_SPATIAL].renames["NODE_POSITION_WORLD"] = "world_transform[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["CAMERA_POSITION_WORLD"] = "camera_matrix[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["CAMERA_DIRECTION_WORLD"] = "camera_inverse_matrix[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["NODE_POSITION_VIEW"] = "(world_transform * camera_inverse_matrix)[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["NODE_POSITION_VIEW"] = "(camera_inverse_matrix * world_transform)[3].xyz";
|
||||
|
||||
//for light
|
||||
actions[VS::SHADER_SPATIAL].renames["VIEW"] = "view";
|
||||
|
|
|
@ -1223,7 +1223,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() {
|
|||
actions[VS::SHADER_SPATIAL].renames["NODE_POSITION_WORLD"] = "world_transform[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["CAMERA_POSITION_WORLD"] = "camera_matrix[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["CAMERA_DIRECTION_WORLD"] = "camera_inverse_matrix[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["NODE_POSITION_VIEW"] = "(world_transform * camera_inverse_matrix)[3].xyz";
|
||||
actions[VS::SHADER_SPATIAL].renames["NODE_POSITION_VIEW"] = "(camera_inverse_matrix * world_transform)[3].xyz";
|
||||
|
||||
//for light
|
||||
actions[VS::SHADER_SPATIAL].renames["VIEW"] = "view";
|
||||
|
|
Loading…
Reference in a new issue