mirror of
https://github.com/slendidev/lunar.git
synced 2025-12-14 11:49:51 +02:00
@@ -19,6 +19,7 @@ shader_sources = files(
|
||||
'triangle.vert',
|
||||
'triangle_mesh.frag',
|
||||
'triangle_mesh.vert',
|
||||
'tex_image.frag',
|
||||
)
|
||||
|
||||
spirv_shaders = []
|
||||
|
||||
13
shaders/tex_image.frag
Normal file
13
shaders/tex_image.frag
Normal file
@@ -0,0 +1,13 @@
|
||||
#version 450
|
||||
|
||||
layout (location = 0) in vec3 in_color;
|
||||
layout (location = 1) in vec2 in_uv;
|
||||
|
||||
layout (location = 0) out vec4 out_frag_color;
|
||||
|
||||
layout (set = 0, binding = 0) uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
out_frag_color = texture(tex, in_uv) * vec4(in_color, 1.0f);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#extension GL_EXT_buffer_reference : require
|
||||
|
||||
layout (location = 0) out vec3 out_color;
|
||||
layout (location = 1) out vec3 out_uv;
|
||||
layout (location = 1) out vec2 out_uv;
|
||||
|
||||
struct Vertex {
|
||||
vec3 position;
|
||||
|
||||
Reference in New Issue
Block a user