From 5812e12d804fc47e1260e52a92e39705e3056364 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Thu, 11 Mar 2021 22:32:41 +0100 Subject: Fix accumulation textures format and reset accumulation on move/resize --- shaders/compute.comp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shaders/compute.comp') 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))); } -- cgit v1.3