diff --git a/src/compute b/src/compute index 5e83a07b..5e68924f 160000 --- a/src/compute +++ b/src/compute @@ -1 +1 @@ -Subproject commit 5e83a07bae0c6fbe4e767be0b55f19fea49160b6 +Subproject commit 5e68924f121118a5ccb80820757a0ffcfadb283e diff --git a/src/films/color.cpp b/src/films/color.cpp index 7a98ad2b..07a95cb8 100644 --- a/src/films/color.cpp +++ b/src/films/color.cpp @@ -109,7 +109,8 @@ void ColorFilmInstance::_accumulate(Expr pixel, Expr rgb, Exprresolution().x + pixel.x; $if(!any(isnan(rgb) || isinf(rgb))) { auto threshold = node()->clamp() * max(effective_spp, 1.f); - auto strength = max(max(max(rgb.x, rgb.y), rgb.z), 0.f); + auto abs_rgb = abs(rgb); + auto strength = max(max(max(abs_rgb.x, abs_rgb.y), abs_rgb.z), 0.f); auto c = rgb * (threshold / max(strength, threshold)); $if(any(c != 0.f)) { _image->atomic(pixel_id).x.fetch_add(c.x);