diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-03-11 22:32:41 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-03-11 22:32:41 +0100 |
| commit | 5812e12d804fc47e1260e52a92e39705e3056364 (patch) | |
| tree | 51357f167872b2e673721b8c30300d716109e04c /shaders | |
| parent | 7e25e65c44864f5e2c1f8227b41ceb6c0fc5e54f (diff) | |
Fix accumulation textures format and reset accumulation on move/resize
Diffstat (limited to 'shaders')
| -rw-r--r-- | shaders/compute.comp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shaders/compute.comp b/shaders/compute.comp index cc33aab..b70b021 100644 --- a/shaders/compute.comp +++ b/shaders/compute.comp @@ -69,8 +69,8 @@ layout(set = 0, binding = 0) buffer Inputs { uint[3] padding; }; -layout(set = 0, binding = 1, rgba8) uniform writeonly image2D output_image; -layout(set = 0, binding = 2, rgba8) uniform readonly image2D accumulation_image; +layout(set = 0, binding = 1, rgba32f) uniform writeonly image2D output_image; +layout(set = 0, binding = 2, rgba32f) uniform readonly image2D accumulation_image; vec3 at(ray r, float t) { return r.origin + r.direction * t; @@ -231,5 +231,5 @@ void main() { float spp_scale = (1.0 / samples_per_pixel); vec4 acc_color = imageLoad(accumulation_image, ivec2(x, y)); - imageStore(output_image, ivec2(x, y), mix(acc_color, out_color, spp_scale)); + imageStore(output_image, ivec2(x, y), vec4(mix(acc_color, out_color, spp_scale))); } |
