project-aster/samples/03_model_render/shader/model.vert.glsl

22 lines
527 B
GLSL

#version 450
#pragma shader_stage(vertex)
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 uv0;
layout(location = 0) out vec2 outUV;
//layout(std140, set=0, binding=0) readonly buffer buffers;
layout(set = 0, binding = 1) uniform texture2D textures[];
layout(set = 1, binding = 0) uniform Camera {
mat4 model;
mat4 view;
mat4 proj;
} ubo;
void main() {
outUV = uv0;
gl_Position = ubo.proj * ubo.view * ubo.model * vec4(position.xyz, 1.0f);
// outColor = vec3(0.5f, 0.3f, 0.1f);
}