32 lines
376 B
GLSL
32 lines
376 B
GLSL
@vs vs
|
|
uniform vs_params {
|
|
float aspectRatio;
|
|
};
|
|
|
|
in vec4 position;
|
|
in vec4 color0;
|
|
|
|
out vec4 color;
|
|
|
|
void main() {
|
|
gl_Position = position;
|
|
gl_Position.x *= aspectRatio;
|
|
color = color0;
|
|
}
|
|
@end
|
|
|
|
@fs fs
|
|
uniform fs_params {
|
|
vec3 offset;
|
|
};
|
|
|
|
in vec4 color;
|
|
out vec4 frag_color;
|
|
|
|
void main() {
|
|
frag_color = color * offset.r;
|
|
}
|
|
@end
|
|
|
|
@program triangle vs fs
|