Skip to content

Commit

Permalink
Add blit shader comment (#3301)
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidster authored Dec 16, 2022
1 parent 0e4c7dd commit f14bee6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions wgpu/examples/mipmap/blit.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ struct VertexOutput {
@location(0) tex_coords: vec2<f32>,
};

// meant to be called with 3 vertex indices: 0, 1, 2
// draws one large triangle over the clip space like this:
// (the asterisks represent the clip space bounds)
//-1,1 1,1
// ---------------------------------
// | * .
// | * .
// | * .
// | * .
// | * .
// | * .
// |***************
// | . 1,-1
// | .
// | .
// | .
// | .
// |.
@vertex
fn vs_main(@builtin(vertex_index) vertex_index: u32) -> VertexOutput {
var result: VertexOutput;
Expand Down

0 comments on commit f14bee6

Please sign in to comment.