28 lines
343 B
GLSL
28 lines
343 B
GLSL
[[vertex]]
|
|
|
|
uniform mat4 mvp;
|
|
|
|
in vec4 pos;
|
|
in vec2 uvs;
|
|
out vec3 uv;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = mvp * pos;
|
|
uv = vec3(uvs, pos.w);
|
|
}
|
|
|
|
[[fragment]]
|
|
|
|
#include "include/hsv.glsl"
|
|
|
|
uniform mediump vec4 col; // HSV
|
|
|
|
in mediump vec3 uv;
|
|
out mediump vec4 frag;
|
|
|
|
void main()
|
|
{
|
|
frag = vec4(hsv2rgb(vec3(col.x, uv.x, 1.0 - uv.y)), 1.0);
|
|
}
|