2021-11-16 15:15:36 +00:00
|
|
|
#version 310 es
|
|
|
|
precision mediump float;
|
|
|
|
|
|
|
|
struct Output {
|
|
|
|
vec4 Position;
|
|
|
|
vec4 color;
|
|
|
|
};
|
2022-01-26 16:48:55 +00:00
|
|
|
|
2021-11-16 15:15:36 +00:00
|
|
|
struct tint_symbol_3 {
|
|
|
|
uint VertexIndex;
|
|
|
|
uint InstanceIndex;
|
|
|
|
};
|
2022-01-26 16:48:55 +00:00
|
|
|
|
2021-11-16 15:15:36 +00:00
|
|
|
struct tint_symbol_4 {
|
|
|
|
vec4 color;
|
|
|
|
vec4 Position;
|
|
|
|
};
|
|
|
|
|
|
|
|
Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) {
|
|
|
|
vec2 zv[4] = vec2[4](vec2(0.200000003f, 0.200000003f), vec2(0.300000012f, 0.300000012f), vec2(-0.100000001f, -0.100000001f), vec2(1.100000024f, 1.100000024f));
|
|
|
|
float z = zv[InstanceIndex].x;
|
|
|
|
Output tint_symbol_1 = Output(vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
|
|
tint_symbol_1.Position = vec4(0.5f, 0.5f, z, 1.0f);
|
|
|
|
vec4 colors[4] = vec4[4](vec4(1.0f, 0.0f, 0.0f, 1.0f), vec4(0.0f, 1.0f, 0.0f, 1.0f), vec4(0.0f, 0.0f, 1.0f, 1.0f), vec4(1.0f, 1.0f, 1.0f, 1.0f));
|
|
|
|
tint_symbol_1.color = colors[InstanceIndex];
|
|
|
|
return tint_symbol_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
tint_symbol_4 tint_symbol(tint_symbol_3 tint_symbol_2) {
|
|
|
|
Output inner_result = tint_symbol_inner(tint_symbol_2.VertexIndex, tint_symbol_2.InstanceIndex);
|
|
|
|
tint_symbol_4 wrapper_result = tint_symbol_4(vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
|
|
wrapper_result.Position = inner_result.Position;
|
|
|
|
wrapper_result.color = inner_result.color;
|
|
|
|
return wrapper_result;
|
|
|
|
}
|
2022-01-26 16:48:55 +00:00
|
|
|
|
|
|
|
|
2022-01-25 19:44:14 +00:00
|
|
|
layout(location = 0) out vec4 color;
|
2022-01-26 16:48:55 +00:00
|
|
|
|
|
|
|
|
2021-11-16 15:15:36 +00:00
|
|
|
void main() {
|
|
|
|
tint_symbol_3 inputs;
|
|
|
|
inputs.VertexIndex = uint(gl_VertexID);
|
|
|
|
inputs.InstanceIndex = uint(gl_InstanceID);
|
|
|
|
tint_symbol_4 outputs;
|
|
|
|
outputs = tint_symbol(inputs);
|
|
|
|
color = outputs.color;
|
|
|
|
gl_Position = outputs.Position;
|
2022-01-26 14:45:55 +00:00
|
|
|
gl_Position.z = 2.0 * gl_Position.z - gl_Position.w;
|
2021-11-16 15:15:36 +00:00
|
|
|
gl_Position.y = -gl_Position.y;
|
|
|
|
}
|
|
|
|
|