forked from AuroraMiddleware/gtk
cc909b160f
Use a unified approach to write both vertex and fragment shader in the same file.
14 lines
251 B
GLSL
14 lines
251 B
GLSL
// VERTEX_SHADER:
|
|
void main() {
|
|
gl_Position = u_projection * u_modelview * vec4(aPosition, 0.0, 1.0);
|
|
|
|
vUv = vec2(aUv.x, aUv.y);
|
|
}
|
|
|
|
// FRAGMENT_SHADER:
|
|
void main() {
|
|
vec4 diffuse = Texture(u_source, vUv);
|
|
|
|
setOutputColor(diffuse * u_alpha);
|
|
}
|