summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders/canvas.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles2/shaders/canvas.glsl')
-rw-r--r--drivers/gles2/shaders/canvas.glsl5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
index 7dce784f52..0818942b0a 100644
--- a/drivers/gles2/shaders/canvas.glsl
+++ b/drivers/gles2/shaders/canvas.glsl
@@ -112,7 +112,12 @@ void main() {
#ifdef USE_INSTANCING
mat4 extra_matrix_instance = extra_matrix * transpose(mat4(instance_xform0, instance_xform1, instance_xform2, vec4(0.0, 0.0, 0.0, 1.0)));
color *= instance_color;
+
+#ifdef USE_INSTANCE_CUSTOM
vec4 instance_custom = instance_custom_data;
+#else
+ vec4 instance_custom = vec4(0.0);
+#endif
#else
mat4 extra_matrix_instance = extra_matrix;