|
|
@ -4,19 +4,17 @@ uniform vec4 m_Color; |
|
|
|
attribute vec3 inPosition; |
|
|
|
attribute vec3 inPosition; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef VERTEX_COLOR |
|
|
|
#ifdef VERTEX_COLOR |
|
|
|
attribute vec4 inColor; |
|
|
|
attribute vec4 inColor; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef TEXTURE |
|
|
|
#ifdef TEXTURE |
|
|
|
attribute vec2 inTexCoord; |
|
|
|
attribute vec2 inTexCoord; |
|
|
|
varying vec2 texCoord; |
|
|
|
varying vec2 texCoord; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
varying vec4 color; |
|
|
|
varying vec4 color; |
|
|
|
|
|
|
|
|
|
|
|
void main() { |
|
|
|
void main() { |
|
|
|
//vec2 pos = (g_WorldViewProjectionMatrix * inPosition).xy; |
|
|
|
|
|
|
|
//gl_Position = vec4(pos, 0.0, 1.0); |
|
|
|
|
|
|
|
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0); |
|
|
|
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0); |
|
|
|
#ifdef TEXTURE |
|
|
|
#ifdef TEXTURE |
|
|
|
texCoord = inTexCoord; |
|
|
|
texCoord = inTexCoord; |
|
|
|