Added color shader

This commit is contained in:
Willem Cazander 2022-01-28 10:39:17 +01:00
parent 5892321cdb
commit 8803b10d68
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,9 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform vec4 u_color;
void main() {
gl_FragColor = vec4(u_color);
}

View file

@ -0,0 +1,10 @@
attribute vec3 a_position;
attribute vec3 a_normal;
attribute vec2 a_texCoord0;
uniform mat4 u_worldTrans;
uniform mat4 u_projTrans;
void main() {
gl_Position = u_projTrans * u_worldTrans * vec4(a_position, 1.0);
}