an_editor/shaders/fragment.wgsl

15 lines
354 B
Plaintext

struct VertexOutput {
@builtin(position) position: vec4<f32>,
@location(0) tex_coord: vec2<f32>,
}
@group(0) @binding(0)
var texture: texture_2d<f32>;
@group(0) @binding(1)
var texture_sampler: sampler;
@fragment
fn fs_main(input: VertexOutput) -> @location(0) vec4<f32> {
return textureSample(texture, texture_sampler, input.tex_coord);
}