summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/shaders
diff options
context:
space:
mode:
authorErik Johnson <ecmjohnson@hotmail.com>2023-01-31 22:53:54 -0500
committerRémi Verschelde <rverschelde@gmail.com>2024-02-13 10:36:38 +0100
commiteab95698cdbec875e7a37d295790bf50f065dedd (patch)
tree31374262db225b47a40c5d9a28801fd36f677fc5 /drivers/gles3/shaders
parent9272f7b53db1f7f142df43981adec5cebdfbd179 (diff)
downloadredot-engine-eab95698cdbec875e7a37d295790bf50f065dedd.tar.gz
Fix shadows for billboarded Sprite3D's
Diffstat (limited to 'drivers/gles3/shaders')
-rw-r--r--drivers/gles3/shaders/scene.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 9e2c8a4452..ffdac85c1e 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -155,6 +155,9 @@ layout(std140) uniform SceneData { // ubo:2
highp mat4 inv_view_matrix;
highp mat4 view_matrix;
+ // Used for billboards to cast correct shadows.
+ highp mat4 main_cam_inv_view_matrix;
+
vec2 viewport_size;
vec2 screen_pixel_size;
@@ -637,6 +640,9 @@ layout(std140) uniform SceneData { // ubo:2
highp mat4 inv_view_matrix;
highp mat4 view_matrix;
+ // Used for billboards to cast correct shadows.
+ highp mat4 main_cam_inv_view_matrix;
+
vec2 viewport_size;
vec2 screen_pixel_size;