summaryrefslogtreecommitdiffstats
path: root/drivers/gles3
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-18 10:45:20 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-18 10:45:20 +0200
commit590628feda19e9f7ea1ea8ed27dd8a13130ef2da (patch)
tree6287f792b8babae0a27dd24c063e2f419fbded15 /drivers/gles3
parentda4f6e439c0daec87d3f87f86b5b4592fca44fdb (diff)
parent89d7a2f0a5afdff188ff605baeb23e08dcc0cccc (diff)
downloadredot-engine-590628feda19e9f7ea1ea8ed27dd8a13130ef2da.tar.gz
Merge pull request #86516 from jsjtxietian/fix-camera-direction
Fix incorrect `CAMERA_DIRECTION_WORLD` calculation
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/storage/material_storage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 21790d29b5..1aaf840b30 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -1280,7 +1280,7 @@ MaterialStorage::MaterialStorage() {
actions.renames["NODE_POSITION_WORLD"] = "model_matrix[3].xyz";
actions.renames["CAMERA_POSITION_WORLD"] = "scene_data.inv_view_matrix[3].xyz";
- actions.renames["CAMERA_DIRECTION_WORLD"] = "scene_data.view_matrix[3].xyz";
+ actions.renames["CAMERA_DIRECTION_WORLD"] = "scene_data.inv_view_matrix[2].xyz";
actions.renames["CAMERA_VISIBLE_LAYERS"] = "scene_data.camera_visible_layers";
actions.renames["NODE_POSITION_VIEW"] = "(scene_data.view_matrix * model_matrix)[3].xyz";