You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
591 B
26 lines
591 B
4 years ago
|
#version 450
|
||
|
|
||
4 years ago
|
layout(location = 0) in vec4 a_Pos;
|
||
|
layout(location = 1) in vec4 a_Normal;
|
||
4 years ago
|
layout(location = 2) in vec2 a_Uv;
|
||
4 years ago
|
|
||
|
layout(location = 0) out vec3 v_Normal;
|
||
|
layout(location = 1) out vec4 v_Position;
|
||
4 years ago
|
layout(location = 2) out vec2 v_Uv;
|
||
4 years ago
|
|
||
|
layout(set = 0, binding = 0) uniform Globals {
|
||
|
mat4 u_ViewProj;
|
||
|
uvec4 u_NumLights;
|
||
|
};
|
||
|
layout(set = 1, binding = 0) uniform Entity {
|
||
|
mat4 u_World;
|
||
|
vec4 u_Color;
|
||
|
};
|
||
|
|
||
|
void main() {
|
||
4 years ago
|
v_Uv = a_Uv;
|
||
4 years ago
|
v_Normal = mat3(u_World) * vec3(a_Normal.xyz);
|
||
|
v_Position = u_World * vec4(a_Pos);
|
||
|
gl_Position = u_ViewProj * v_Position;
|
||
|
}
|