mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
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:
parent
fd4a06c515
commit
e2321c21db
7 changed files with 33 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue