diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-18 10:45:20 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-18 10:45:20 +0200 |
commit | 590628feda19e9f7ea1ea8ed27dd8a13130ef2da (patch) | |
tree | 6287f792b8babae0a27dd24c063e2f419fbded15 /drivers/gles3 | |
parent | da4f6e439c0daec87d3f87f86b5b4592fca44fdb (diff) | |
parent | 89d7a2f0a5afdff188ff605baeb23e08dcc0cccc (diff) | |
download | redot-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.cpp | 2 |
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"; |