2022-01-21 22:38:16 +00:00
SKIP: FAILED
#version 310 es
2022-01-28 22:36:58 +00:00
layout(location = 0) in vec4 position_1;
layout(location = 1) in vec4 color_1;
layout(location = 0) out vec4 v_color_1;
2022-01-21 22:38:16 +00:00
struct Time {
float value;
};
2022-01-26 16:48:55 +00:00
2022-01-21 22:38:16 +00:00
struct Uniforms {
float scale;
float offsetX;
float offsetY;
float scalar;
float scalarOffset;
};
2022-01-25 20:06:05 +00:00
layout(binding = 0) uniform Time_1 {
2022-01-21 22:38:16 +00:00
float value;
} time;
2022-01-26 16:48:55 +00:00
2022-01-25 20:06:05 +00:00
layout(binding = 1) uniform Uniforms_1 {
2022-01-21 22:38:16 +00:00
float scale;
float offsetX;
float offsetY;
float scalar;
float scalarOffset;
} uniforms;
struct VertexOutput {
vec4 Position;
vec4 v_color;
};
2022-01-26 16:48:55 +00:00
2022-01-28 22:36:58 +00:00
VertexOutput vert_main(vec4 position, vec4 color) {
2022-01-21 22:38:16 +00:00
float fade = ((uniforms.scalarOffset + ((time.value * uniforms.scalar) / 10.0f)) % 1.0f);
if ((fade < 0.5f)) {
fade = (fade * 2.0f);
} else {
fade = ((1.0f - fade) * 2.0f);
}
float xpos = (position.x * uniforms.scale);
float ypos = (position.y * uniforms.scale);
float angle = ((3.141590118f * 2.0f) * fade);
float xrot = ((xpos * cos(angle)) - (ypos * sin(angle)));
float yrot = ((xpos * sin(angle)) + (ypos * cos(angle)));
xpos = (xrot + uniforms.offsetX);
ypos = (yrot + uniforms.offsetY);
VertexOutput tint_symbol = VertexOutput(vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f));
tint_symbol.v_color = (vec4(fade, (1.0f - fade), 0.0f, 1.0f) + color);
tint_symbol.Position = vec4(xpos, ypos, 0.0f, 1.0f);
return tint_symbol;
}
void main() {
2022-01-28 22:36:58 +00:00
VertexOutput inner_result = vert_main(position_1, color_1);
gl_Position = inner_result.Position;
v_color_1 = inner_result.v_color;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
2022-01-21 22:38:16 +00:00
}
Error parsing GLSL shader:
2022-02-07 18:49:46 +00:00
ERROR: 0:36: '%' : wrong operand types: no operation '%' exists that takes a left-hand operand of type ' temp highp float' and a right operand of type ' const float' (or there is no acceptable conversion)
ERROR: 0:36: '' : compilation terminated
2022-01-21 22:38:16 +00:00
ERROR: 2 compilation errors. No code generated.
#version 310 es
precision mediump float;
2022-01-28 22:36:58 +00:00
layout(location = 0) in vec4 v_color_1;
layout(location = 0) out vec4 value_1;
2022-01-21 22:38:16 +00:00
struct Time {
float value;
};
2022-01-26 16:48:55 +00:00
2022-01-21 22:38:16 +00:00
struct Uniforms {
float scale;
float offsetX;
float offsetY;
float scalar;
float scalarOffset;
};
2022-01-26 16:48:55 +00:00
2022-01-21 22:38:16 +00:00
struct VertexOutput {
vec4 Position;
vec4 v_color;
};
2022-01-26 16:48:55 +00:00
2022-01-28 22:36:58 +00:00
vec4 frag_main(vec4 v_color) {
2022-01-21 22:38:16 +00:00
return v_color;
}
void main() {
2022-01-28 22:36:58 +00:00
vec4 inner_result = frag_main(v_color_1);
value_1 = inner_result;
return;
2022-01-21 22:38:16 +00:00
}