Skip to content

Commit

Permalink
Merge branch 'next' of github.com:LuisaGroup/LuisaRender into next
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmc committed Nov 14, 2023
2 parents 54e9705 + a30edfb commit 0418499
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/compute
Submodule compute updated 114 files
3 changes: 2 additions & 1 deletion src/films/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ void ColorFilmInstance::_accumulate(Expr<uint2> pixel, Expr<float3> rgb, Expr<fl
auto pixel_id = pixel.y * node()->resolution().x + pixel.x;
$if(!any(isnan(rgb) || isinf(rgb))) {
auto threshold = node<ColorFilm>()->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);
Expand Down

0 comments on commit 0418499

Please sign in to comment.