Skip to content

batch rays together, decimate allocations and speedup ~3x#4

Open
fjbarter wants to merge 1 commit intomainfrom
batch_tracing
Open

batch rays together, decimate allocations and speedup ~3x#4
fjbarter wants to merge 1 commit intomainfrom
batch_tracing

Conversation

@fjbarter
Copy link
Copy Markdown
Owner

rather large effort to batch rays together for passing to ImplicitBVH. overload LVT traversal algorithm to only trace 'active' rays, i.e. that have not been terminated (hit a sink, bbox, max bounces, max length etc)

this aims to effectively eliminate allocations in the ray tracing loop, as traversal caches are now being adequately utilised for ray tracing, and direction + position matrices do not need to be created per traverse_rays call. simply mutate the RayBatchBuffer

strong scaling is decent but not amazing: 1000 rays -> 11.3 s on 1 thread, 3.6 s on 4 threads for a ~3.1x speedup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant