From 5186d4f3ad2e6db4ff68f4afd9f288bdc9cde1fd Mon Sep 17 00:00:00 2001 From: JFonS Date: Thu, 7 Feb 2019 15:58:36 +0100 Subject: Fix canvas light shaders on GLES2 --- drivers/gles2/shaders/canvas.glsl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'drivers/gles2/shaders') diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index c4a8c8b990..198e25aeb0 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -316,9 +316,35 @@ FRAGMENT_SHADER_GLOBALS /* 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() { vec4 color = color_interp; + vec2 uv = uv_interp; #if !defined(COLOR_USED) //default behavior, texture by color -- cgit v1.2.3