diff --git a/core/assets/shader/color.fragment.glsl b/core/assets/shader/color.fragment.glsl new file mode 100644 index 00000000..4c993422 --- /dev/null +++ b/core/assets/shader/color.fragment.glsl @@ -0,0 +1,9 @@ +#ifdef GL_ES +precision mediump float; +#endif + +uniform vec4 u_color; + +void main() { + gl_FragColor = vec4(u_color); +} diff --git a/core/assets/shader/color.vertex.glsl b/core/assets/shader/color.vertex.glsl new file mode 100644 index 00000000..39271bd7 --- /dev/null +++ b/core/assets/shader/color.vertex.glsl @@ -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); +}