examples: add pixel post processing effect example
This commit is contained in:
parent
6183e39593
commit
eef76effe3
9 changed files with 618 additions and 0 deletions
20
examples/pixel-post-process/vert.wgsl
Normal file
20
examples/pixel-post-process/vert.wgsl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@group(0) @binding(0) var<uniform> ubo: mat4x4<f32>;
|
||||
|
||||
struct VertexOut {
|
||||
@builtin(position) position_clip: vec4<f32>,
|
||||
@location(0) normal: vec3<f32>,
|
||||
@location(1) uv: vec2<f32>,
|
||||
}
|
||||
|
||||
@vertex fn main(
|
||||
@location(0) position: vec3<f32>,
|
||||
@location(1) normal: vec3<f32>,
|
||||
@location(2) uv: vec2<f32>
|
||||
) -> VertexOut {
|
||||
var output: VertexOut;
|
||||
output.position_clip = vec4<f32>(position, 1) * ubo;
|
||||
output.normal = (vec4<f32>(normal, 0) * ubo).xyz;
|
||||
output.uv = uv;
|
||||
return output;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue