mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
34 lines
785 B
GLSL
34 lines
785 B
GLSL
#version 450
|
|
|
|
layout(set = 0, binding = 0) uniform PerFrame {
|
|
mat4 view;
|
|
mat4 projection;
|
|
mat4 lightSpaceMatrix;
|
|
vec4 lightDir;
|
|
vec4 lightColor;
|
|
vec4 ambientColor;
|
|
vec4 viewPos;
|
|
vec4 fogColor;
|
|
vec4 fogParams;
|
|
vec4 shadowParams;
|
|
};
|
|
|
|
layout(push_constant) uniform Push {
|
|
mat4 model;
|
|
} push;
|
|
|
|
layout(location = 0) in vec3 aPosition;
|
|
layout(location = 1) in vec3 aNormal;
|
|
layout(location = 2) in vec2 aTexCoord;
|
|
|
|
layout(location = 0) out vec3 FragPos;
|
|
layout(location = 1) out vec3 Normal;
|
|
layout(location = 2) out vec2 TexCoord;
|
|
|
|
void main() {
|
|
vec4 worldPos = push.model * vec4(aPosition, 1.0);
|
|
FragPos = worldPos.xyz;
|
|
Normal = mat3(push.model) * aNormal;
|
|
TexCoord = aTexCoord;
|
|
gl_Position = projection * view * worldPos;
|
|
}
|