2021-01-25 15:55:45 +00:00
|
|
|
#version 450
|
2022-11-21 11:02:18 +00:00
|
|
|
#extension GL_GOOGLE_include_directive : enable
|
2021-01-25 15:55:45 +00:00
|
|
|
|
2022-11-21 11:02:18 +00:00
|
|
|
layout (set = 0, binding = 0) uniform
|
|
|
|
#include "matrices.h"
|
|
|
|
;
|
2021-01-25 15:55:45 +00:00
|
|
|
|
|
|
|
layout (push_constant) uniform PushConstants {
|
|
|
|
mat4 Model;
|
|
|
|
float blend;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout (location = 0) in vec4 vertexa;
|
|
|
|
layout (location = 1) in vec3 normala;
|
|
|
|
layout (location = 2) in vec4 vertexb;
|
|
|
|
layout (location = 3) in vec3 normalb;
|
|
|
|
layout (location = 4) in vec2 uv;
|
|
|
|
|
|
|
|
layout (location = 0) out vec2 st;
|
2021-02-25 04:46:33 +00:00
|
|
|
layout (location = 1) out vec4 position;
|
2021-01-25 15:55:45 +00:00
|
|
|
layout (location = 2) out vec3 normal;
|
|
|
|
|
|
|
|
void
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
vec4 vertex;
|
|
|
|
vec3 norm;
|
|
|
|
vec4 pos;
|
|
|
|
|
|
|
|
vertex = mix (vertexa, vertexb, blend);
|
|
|
|
norm = mix (normala, normalb, blend);
|
|
|
|
pos = (Model * vertex);
|
2021-12-08 07:44:22 +00:00
|
|
|
gl_Position = Projection3d * (View * pos);
|
2021-02-25 04:46:33 +00:00
|
|
|
position = pos;
|
2022-05-05 14:46:24 +00:00
|
|
|
normal = normalize (mat3 (Model) * norm);
|
2021-01-25 15:55:45 +00:00
|
|
|
st = uv;
|
|
|
|
}
|