Merge pull request #25682 from JFonS/fix_light_canvas_gles2
Fix canvas light shaders on GLES2
This commit is contained in:
commit
204f9083f4
1 changed files with 26 additions and 0 deletions
|
@ -316,9 +316,35 @@ FRAGMENT_SHADER_GLOBALS
|
||||||
|
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
|
void light_compute(
|
||||||
|
inout vec4 light,
|
||||||
|
inout vec2 light_vec,
|
||||||
|
inout float light_height,
|
||||||
|
inout vec4 light_color,
|
||||||
|
vec2 light_uv,
|
||||||
|
inout vec4 shadow_color,
|
||||||
|
vec3 normal,
|
||||||
|
vec2 uv,
|
||||||
|
#if defined(SCREEN_UV_USED)
|
||||||
|
vec2 screen_uv,
|
||||||
|
#endif
|
||||||
|
vec4 color) {
|
||||||
|
|
||||||
|
#if defined(USE_LIGHT_SHADER_CODE)
|
||||||
|
|
||||||
|
/* clang-format off */
|
||||||
|
|
||||||
|
LIGHT_SHADER_CODE
|
||||||
|
|
||||||
|
/* clang-format on */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
vec4 color = color_interp;
|
vec4 color = color_interp;
|
||||||
|
vec2 uv = uv_interp;
|
||||||
|
|
||||||
#if !defined(COLOR_USED)
|
#if !defined(COLOR_USED)
|
||||||
//default behavior, texture by color
|
//default behavior, texture by color
|
||||||
|
|
Loading…
Reference in a new issue