Riyyi
4 years ago
5 changed files with 27 additions and 15 deletions
@ -0,0 +1,16 @@ |
|||||||
|
#version 450 core |
||||||
|
|
||||||
|
layout(location = 0) in vec3 a_position; |
||||||
|
layout(location = 1) in vec4 a_color; |
||||||
|
|
||||||
|
out vec4 v_color; |
||||||
|
|
||||||
|
uniform mat4 u_projectionView; |
||||||
|
uniform mat4 u_model; |
||||||
|
|
||||||
|
void main() |
||||||
|
{ |
||||||
|
v_color = a_color; |
||||||
|
// Vclip = Camera projection * Camera view * Model transform * Vlocal |
||||||
|
gl_Position = u_projectionView * u_model * vec4(a_position, 1.0f); |
||||||
|
} |
@ -1,12 +0,0 @@ |
|||||||
#version 450 core |
|
||||||
|
|
||||||
layout(location = 0) in vec3 a_position; |
|
||||||
layout(location = 1) in vec4 a_color; |
|
||||||
|
|
||||||
out vec4 v_color; |
|
||||||
|
|
||||||
void main() |
|
||||||
{ |
|
||||||
v_color = a_color; |
|
||||||
gl_Position = vec4(a_position, 1.0f); |
|
||||||
} |
|
@ -1,12 +1,19 @@ |
|||||||
#version 450 core |
#version 450 core |
||||||
|
|
||||||
layout(location = 0) in vec3 a_position; |
layout(location = 0) in vec3 a_position; |
||||||
layout(location = 1) in vec2 a_texCoord; |
layout(location = 1) in vec4 a_color; |
||||||
|
layout(location = 2) in vec2 a_texCoord; |
||||||
|
|
||||||
|
out vec4 v_color; |
||||||
out vec2 v_texCoord; |
out vec2 v_texCoord; |
||||||
|
|
||||||
|
uniform mat4 u_projectionView; |
||||||
|
uniform mat4 u_model; |
||||||
|
|
||||||
void main() |
void main() |
||||||
{ |
{ |
||||||
|
v_color = a_color; |
||||||
v_texCoord = a_texCoord; |
v_texCoord = a_texCoord; |
||||||
gl_Position = vec4(a_position, 1.0f); |
// Vclip = Camera projection * Camera view * Model transform * Vlocal |
||||||
|
gl_Position = u_projectionView * u_model * vec4(a_position, 1.0f); |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue