fix shaders format
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
[[vertex]]
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
in vec4 pos;
|
||||
in vec2 uvs;
|
||||
out vec3 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = mvp * pos;
|
||||
uv = vec3(uvs, pos.w);
|
||||
};
|
||||
gl_Position = mvp * pos;
|
||||
uv = vec3(uvs, pos.w);
|
||||
}
|
||||
|
||||
[[fragment]]
|
||||
|
||||
#include "include/hsv.glsl"
|
||||
|
||||
uniform mediump vec4 col;
|
||||
uniform bool dir; // 0:horizontal, 1:vertical
|
||||
|
||||
in mediump vec3 uv;
|
||||
out mediump vec4 frag;
|
||||
|
||||
void main()
|
||||
{
|
||||
frag = vec4(hsv2rgb(vec3(dir?uv.y:uv.x, 1.0, 1.0)), 1.0);
|
||||
};
|
||||
|
||||
frag = vec4(hsv2rgb(vec3(dir?uv.y:uv.x, 1.0, 1.0)), 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user