Added color shader
This commit is contained in:
parent
5892321cdb
commit
8803b10d68
9
core/assets/shader/color.fragment.glsl
Normal file
9
core/assets/shader/color.fragment.glsl
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform vec4 u_color;
|
||||
|
||||
void main() {
|
||||
gl_FragColor = vec4(u_color);
|
||||
}
|
10
core/assets/shader/color.vertex.glsl
Normal file
10
core/assets/shader/color.vertex.glsl
Normal 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);
|
||||
}
|
Loading…
Reference in a new issue