11 lines
389 B
WebGPU Shading Language
11 lines
389 B
WebGPU Shading Language
#import bevy_sprite::mesh2d_vertex_output::VertexOutput
|
|
|
|
@group(#{MATERIAL_BIND_GROUP}) @binding(0) var tex: texture_2d<f32>;
|
|
@group(#{MATERIAL_BIND_GROUP}) @binding(1) var samp: sampler;
|
|
|
|
@fragment
|
|
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
|
|
// in.uv is [0,1]; sample the offscreen image directly (linear sampler upscales).
|
|
return textureSample(tex, samp, in.uv);
|
|
}
|