init tick 분리
This commit is contained in:
11
Client/shaders/basic.frag
Normal file
11
Client/shaders/basic.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 450
|
||||
#include "common.glsl"
|
||||
|
||||
layout(location = 0) in vec2 vertex_uv;
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
layout(set = 1, binding = 0) uniform sampler2D texture_sampler;
|
||||
|
||||
void main() {
|
||||
out_color = texture(texture_sampler, vertex_uv);
|
||||
}
|
||||
16
Client/shaders/basic.vert
Normal file
16
Client/shaders/basic.vert
Normal file
@@ -0,0 +1,16 @@
|
||||
#version 450
|
||||
#include "common.glsl"
|
||||
|
||||
layout(location = 0) in vec3 input_position;
|
||||
layout(location = 1) in vec2 input_uv;
|
||||
|
||||
layout(location = 0) out vec2 vertex_uv;
|
||||
|
||||
layout(push_constant) uniform Model {
|
||||
mat4 transformation;
|
||||
} model;
|
||||
|
||||
void main() {
|
||||
gl_Position = camera.projection * camera.view * model.transformation * vec4(input_position, 1.0);
|
||||
vertex_uv = input_uv;
|
||||
}
|
||||
7
Client/shaders/common.glsl
Normal file
7
Client/shaders/common.glsl
Normal file
@@ -0,0 +1,7 @@
|
||||
#extension GL_KHR_vulkan_glsl : enable
|
||||
|
||||
layout(set = 0, binding = 0) uniform UniformTransformations {
|
||||
mat4 view;
|
||||
mat4 projection;
|
||||
}
|
||||
camera;
|
||||
Reference in New Issue
Block a user