summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-12 11:27:21 +0100
committerGitHub <noreply@github.com>2019-02-12 11:27:21 +0100
commit204f9083f4222b2a6f0d6f4133541e5097802ea6 (patch)
tree5dda6f3b4bcd3f7da86ee3da08504b123ba1f48e /drivers/gles2/shaders
parent9c6f19117c85da45349d69a68c581657bed6994b (diff)
parent5186d4f3ad2e6db4ff68f4afd9f288bdc9cde1fd (diff)
Merge pull request #25682 from JFonS/fix_light_canvas_gles2
Fix canvas light shaders on GLES2
Diffstat (limited to 'drivers/gles2/shaders')
-rw-r--r--drivers/gles2/shaders/canvas.glsl26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
index 23cb7a7f31..643b6a5cc9 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