move to GLSL (rip rust-gpu 😭)
This commit is contained in:
parent
c1df7bf365
commit
d4623ab21f
14 changed files with 457 additions and 486 deletions
17
shaders/main.frag
Normal file
17
shaders/main.frag
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#version 450
|
||||
|
||||
layout(location = 0) in vec3 frag_world_position;
|
||||
layout(location = 1) in vec3 frag_world_normal;
|
||||
layout(location = 2) in vec2 frag_tex_coord;
|
||||
|
||||
layout(set = 0, binding = 1) uniform sampler2D tex_sampler;
|
||||
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
// Sample the texture
|
||||
vec4 base_color = texture(tex_sampler, frag_tex_coord);
|
||||
|
||||
// Output final color
|
||||
out_color = vec4(base_color.rgb, base_color.a);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue