Using alpha value

This commit is contained in:
Fredi 2024-07-07 17:28:52 +02:00
parent 686b31e41d
commit e6222d82ee

View file

@ -1,5 +1,7 @@
@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let global_coord: vec3<f32> = in.world_position;
return vec4(in.color[3],in.color[3],in.color[3], in.color[3]);
let tex = textureSample(t_diffuse, s_diffuse, in.tex_coords);
var final_color: vec4<f32> = tex * in.color;
return vec4(global_coord, final_color.a);
}