Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Creating octtree on GPU

Discussion in 'Shaders' started by neginfinity, Dec 9, 2016.

  1. neginfinity


    Jan 27, 2013
    Has anyone here tried to build an Octtree in a shader?

    Basically this requires syncrhonization and a simple attempt to implement a per-node mutex using InterlockedAdd or InterlockedCompareExchange causes shader to lock up and get killed by driver.

    Online sources seem to suggest using Morton codes and sorting them. Been wondering if this can be done without a sorting phase.