diff options
author | Patrick Exner <patrick.exner1@web.de> | 2022-07-28 23:56:28 +0200 |
---|---|---|
committer | Patrick Exner <patrick.exner1@web.de> | 2022-08-02 17:30:41 +0200 |
commit | fe5901310e19540c5d6e4e9289755158f17f3352 (patch) | |
tree | 55cf4ed7349bdfbd8ed5bf7f57363cc77b20a038 /drivers/gles3/storage/material_storage.cpp | |
parent | 47be80905c2ffe8fcc7e33d1cffb9685bb461929 (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.cpp | 5 |
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"; |