Skip to content

Commit

Permalink
Add nan checks for AtomicFramebuffer splats
Browse files Browse the repository at this point in the history
  • Loading branch information
tunabrain committed Nov 28, 2018
1 parent 96a8bb3 commit 902c43f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/cameras/AtomicFramebuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ class AtomicFramebuffer

inline void splat(Vec2u pixel, Vec3f w)
{
if (std::isnan(w) || std::isinf(w))
return;

uint32 idx = pixel.x() + pixel.y()*_w;
atomicAdd(_buffer[idx].x(), w.x());
atomicAdd(_buffer[idx].y(), w.y());
Expand Down

0 comments on commit 902c43f

Please sign in to comment.