examples: add textured-cube example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f8e7f96a4a
commit
d0d0db8725
6 changed files with 383 additions and 7 deletions
8
examples/textured-cube/frag.wgsl
Normal file
8
examples/textured-cube/frag.wgsl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
@group(0) @binding(1) var mySampler: sampler;
|
||||
@group(0) @binding(2) var myTexture: texture_2d<f32>;
|
||||
|
||||
@stage(fragment)
|
||||
fn main(@location(0) fragUV: vec2<f32>,
|
||||
@location(1) fragPosition: vec4<f32>) -> @location(0) vec4<f32> {
|
||||
return textureSample(myTexture, mySampler, fragUV);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue