This commit is contained in:
Andras Schmelczer 2023-04-29 11:58:14 +01:00
commit 9e582110ea
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
27 changed files with 248 additions and 123 deletions

View file

@ -1,8 +1,14 @@
@group(0) @binding(0) var mySampler: sampler;
@group(0) @binding(1) var TargetTexture : texture_2d<f32>;
struct Settings {
size : vec2<f32>,
deltaTime : f32,
time : f32,
};
@group(0) @binding(0) var<uniform> settings : Settings;
@group(0) @binding(1) var mySampler: sampler;
@group(0) @binding(2) var TargetTexture : texture_2d<f32>;
@fragment
fn fragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
return vec4(textureSample(TargetTexture, mySampler, uv).rgb * 1.0, 1);
return vec4(textureSample(TargetTexture, mySampler, uv).r * 1.0, settings.deltaTime * 0.0, 0.0, 1.0);
}