Unity ComputeShader implementation of BVH(Bounding Volume Hierarchy) based mesh hit checking.
Add the following address to UnitPackageManager.
https://github.com/fuqunaga/ComputeShaderBVHMeshHit.git?path=/Packages/ComputeShaderBVHMeshHit
- Window > BvhBuilder
- Set
meshObjectRootobject. - Build to create BvhAsset.
- Put BvhHelperBehaviour to the Hierarchy.
- Set BvhAsset.
- Call
BvhHelperBehaviour.SetBuffersToComputeShader().
- Add the following include statement to your ComputeShader.
#include "Packages/ga.fuquna.computeshaderbvhmeshhit/Bvh.hlsl" - Call
TraverseBvh()to detect a mesh hit.
- http://raytracey.blogspot.com/2016/01/gpu-path-tracing-tutorial-3-take-your.html
- http://marupeke296.com/COL_3D_No18_LineAndAABB.html
- https://shikousakugo.wordpress.com/2012/06/27/ray-intersection-2/


