summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/shaders/canvas_uniforms_inc.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/shaders/canvas_uniforms_inc.glsl')
-rw-r--r--drivers/gles3/shaders/canvas_uniforms_inc.glsl37
1 files changed, 18 insertions, 19 deletions
diff --git a/drivers/gles3/shaders/canvas_uniforms_inc.glsl b/drivers/gles3/shaders/canvas_uniforms_inc.glsl
index f6ad2b730a..94cbbdd8a7 100644
--- a/drivers/gles3/shaders/canvas_uniforms_inc.glsl
+++ b/drivers/gles3/shaders/canvas_uniforms_inc.glsl
@@ -1,33 +1,32 @@
-
#define MAX_LIGHTS_PER_ITEM uint(16)
#define M_PI 3.14159265359
#define SDF_MAX_LENGTH 16384.0
-//1 means enabled, 2+ means trails in use
-#define FLAGS_INSTANCING_MASK uint(0x7F)
-#define FLAGS_INSTANCING_HAS_COLORS uint(1 << 7)
-#define FLAGS_INSTANCING_HAS_CUSTOM_DATA uint(1 << 8)
-
-#define FLAGS_CLIP_RECT_UV uint(1 << 9)
-#define FLAGS_TRANSPOSE_RECT uint(1 << 10)
-// (1 << 11) is for FLAGS_CONVERT_ATTRIBUTES_TO_LINEAR in RD backends, unused here.
-#define FLAGS_NINEPACH_DRAW_CENTER uint(1 << 12)
+#define INSTANCE_FLAGS_LIGHT_COUNT_SHIFT 0 // 4 bits.
-#define FLAGS_NINEPATCH_H_MODE_SHIFT 16
-#define FLAGS_NINEPATCH_V_MODE_SHIFT 18
+#define INSTANCE_FLAGS_CLIP_RECT_UV uint(1 << 4)
+#define INSTANCE_FLAGS_TRANSPOSE_RECT uint(1 << 5)
+#define INSTANCE_FLAGS_USE_MSDF uint(1 << 6)
+#define INSTANCE_FLAGS_USE_LCD uint(1 << 7)
-#define FLAGS_LIGHT_COUNT_SHIFT 20
+#define INSTANCE_FLAGS_NINEPATCH_DRAW_CENTER uint(1 << 8)
+#define INSTANCE_FLAGS_NINEPATCH_H_MODE_SHIFT 9
+#define INSTANCE_FLAGS_NINEPATCH_V_MODE_SHIFT 11
-#define FLAGS_DEFAULT_NORMAL_MAP_USED uint(1 << 26)
-#define FLAGS_DEFAULT_SPECULAR_MAP_USED uint(1 << 27)
+#define INSTANCE_FLAGS_SHADOW_MASKED_SHIFT 13u // 16 bits.
+#define INSTANCE_FLAGS_SHADOW_MASKED uint(1 << INSTANCE_FLAGS_SHADOW_MASKED_SHIFT)
-#define FLAGS_USE_MSDF uint(1 << 28)
-#define FLAGS_USE_LCD uint(1 << 29)
+// 1 means enabled, 2+ means trails in use
+#define BATCH_FLAGS_INSTANCING_MASK uint(0x7F)
+#define BATCH_FLAGS_INSTANCING_HAS_COLORS_SHIFT 7
+#define BATCH_FLAGS_INSTANCING_HAS_COLORS uint(1 << BATCH_FLAGS_INSTANCING_HAS_COLORS_SHIFT)
+#define BATCH_FLAGS_INSTANCING_HAS_CUSTOM_DATA_SHIFT 8
+#define BATCH_FLAGS_INSTANCING_HAS_CUSTOM_DATA uint(1 << BATCH_FLAGS_INSTANCING_HAS_CUSTOM_DATA_SHIFT)
-#define FLAGS_FLIP_H uint(1 << 30)
-#define FLAGS_FLIP_V uint(1 << 31)
+#define BATCH_FLAGS_DEFAULT_NORMAL_MAP_USED uint(1 << 9)
+#define BATCH_FLAGS_DEFAULT_SPECULAR_MAP_USED uint(1 << 10)
layout(std140) uniform GlobalShaderUniformData { //ubo:1
vec4 global_shader_uniforms[MAX_GLOBAL_SHADER_UNIFORMS];