Enable the use of all builtins on the light shader

When using the light process in spatial shader,
the built-ins work as spected, now they work in forward+,
mobile and compatibility renderer.
This commit is contained in:
Manuel Dun 2023-05-11 18:56:04 -04:00
parent fd4a06c515
commit e2321c21db
7 changed files with 33 additions and 5 deletions

View file

@ -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;