파일 분리, 셰이더 로드까지 수강.

This commit is contained in:
2025-04-09 04:26:32 +09:00
parent f5ba3795f0
commit 5787efbc15
19 changed files with 766 additions and 192 deletions

8
shaders/basic.frag Normal file
View File

@@ -0,0 +1,8 @@
#version 450
#include "common.glsl"
layout(location = 0) out vec4 out_color;
void main() {
out_color = vec4(1.0, 0.0, 0.5, 1.0);
}

13
shaders/basic.vert Normal file
View File

@@ -0,0 +1,13 @@
#version 450
#include "common.glsl"
vec2 hardcoded_positions[3] = vec2[](
vec2(0.0, -0.5),
vec2(0.5, 0.5),
vec2(-0.5, 0.5)
);
void main() {
vec2 current_Position = hardcoded_positions[gl_VertexIndex];
gl_Position = vec4(current_Position, 0.0, 1.0);
}

1
shaders/common.glsl Normal file
View File

@@ -0,0 +1 @@
#extension GL_KHR_vulkan_glsl : enable