mach/examples/textured-cube/frag.wgsl
Stephen Gutekanst f299d87aa2 {examples,shaderexp}: update to new mach/gpu API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00

8 lines
283 B
WebGPU Shading Language

@group(0) @binding(1) var mySampler: sampler;
@group(0) @binding(2) var myTexture: texture_2d<f32>;
@fragment
fn main(@location(0) fragUV: vec2<f32>,
@location(1) fragPosition: vec4<f32>) -> @location(0) vec4<f32> {
return textureSample(myTexture, mySampler, fragUV);
}