mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-01-10 22:23:35 +00:00
29 lines
414 B
Plaintext
29 lines
414 B
Plaintext
[nzsl_version("1.0")]
|
|
module;
|
|
|
|
struct VertOut
|
|
{
|
|
[location(0)] color: vec4[f32],
|
|
[location(1)] uv: vec2[f32]
|
|
}
|
|
|
|
struct FragOut
|
|
{
|
|
[location(0)] color: vec4[f32]
|
|
}
|
|
|
|
external
|
|
{
|
|
[set(1), binding(0)] u_texture: sampler2D[f32]
|
|
}
|
|
|
|
[entry(frag)]
|
|
fn main(input: VertOut) -> FragOut
|
|
{
|
|
let output: FragOut;
|
|
output.color = input.color * u_texture.Sample(input.uv);
|
|
if(output.color.w == 0.0)
|
|
discard;
|
|
return output;
|
|
}
|