summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/shaders
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-06-09 11:04:46 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-06-09 11:04:46 +0200
commit9ce42d176dc0ded24c8ea1c0d6e74d78022c8535 (patch)
tree62c543f71df94fba3cbf5e0a7a92a85ec06fdd81 /drivers/gles3/shaders
parent166643df326724ab439721dcf1eb2d367ae5b744 (diff)
parente2321c21dbf353b2ba1f22283054584109a6c1fa (diff)
downloadredot-engine-9ce42d176dc0ded24c8ea1c0d6e74d78022c8535.tar.gz
Merge pull request #76977 from manueldun/light-shader-builtins
Enable the use of all supported builtins on the light shader
Diffstat (limited to 'drivers/gles3/shaders')
-rw-r--r--drivers/gles3/shaders/scene.glsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 37976bb9a0..aa68febec8 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -642,6 +642,10 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, bool is_di
#if defined(USE_LIGHT_SHADER_CODE)
// light is written by the light shader
+ highp mat4 model_matrix = world_transform;
+ mat4 projection_matrix = scene_data.projection_matrix;
+ mat4 inv_projection_matrix = scene_data.inv_projection_matrix;
+
vec3 normal = N;
vec3 light = L;
vec3 view = V;