fix shaders format
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
[[vertex]]
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
in vec4 pos;
|
||||
in vec2 uvs;
|
||||
out vec2 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
uv = uvs;
|
||||
gl_Position = mvp * vec4(pos.xyz, 1.0);
|
||||
};
|
||||
}
|
||||
|
||||
[[fragment]]
|
||||
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D tex_alpha;
|
||||
uniform sampler2D tex_bg;
|
||||
uniform mediump float alpha;
|
||||
uniform bool highlight;
|
||||
|
||||
in mediump vec2 uv;
|
||||
out mediump vec4 frag;
|
||||
|
||||
void main()
|
||||
{
|
||||
mediump vec3 rgb = texture(tex, uv).rgb;
|
||||
@@ -25,4 +31,4 @@ void main()
|
||||
frag = highlight ?
|
||||
vec4(clamp(vec3(0.3) + c.rgb, vec3(0.0), vec3(1.0)), c.a) :
|
||||
texture(tex, uv) * vec4(1.0, 1.0, 1.0, alpha);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user