summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders/canvas.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/shaders/canvas.glsl')
-rw-r--r--drivers/gles3/shaders/canvas.glsl5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl
index 0d1e7ee4a1..a46b31c92e 100644
--- a/drivers/gles3/shaders/canvas.glsl
+++ b/drivers/gles3/shaders/canvas.glsl
@@ -117,7 +117,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;