summaryrefslogtreecommitdiff
path: root/drivers/gles3/storage/material_storage.cpp
diff options
context:
space:
mode:
authorPatrick Exner <patrick.exner1@web.de>2022-07-28 23:56:28 +0200
committerPatrick Exner <patrick.exner1@web.de>2022-08-02 17:30:41 +0200
commitfe5901310e19540c5d6e4e9289755158f17f3352 (patch)
tree55cf4ed7349bdfbd8ed5bf7f57363cc77b20a038 /drivers/gles3/storage/material_storage.cpp
parent47be80905c2ffe8fcc7e33d1cffb9685bb461929 (diff)
Add spatial built-ins (camera-pos, object-pos, camera-eye etc.)
Diffstat (limited to 'drivers/gles3/storage/material_storage.cpp')
-rw-r--r--drivers/gles3/storage/material_storage.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 24791b94d0..9440a3a0ae 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -1508,6 +1508,11 @@ MaterialStorage::MaterialStorage() {
actions.renames["CUSTOM3"] = "custom3_attrib";
actions.renames["OUTPUT_IS_SRGB"] = "SHADER_IS_SRGB";
+ 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["NODE_POSITION_VIEW"] = "(model_matrix * scene_data.view_matrix)[3].xyz";
+
actions.renames["VIEW_INDEX"] = "ViewIndex";
actions.renames["VIEW_MONO_LEFT"] = "0";
actions.renames["VIEW_RIGHT"] = "1";