I am looking for some way to estimate the amount of overlap between a rectangular prism(not axis aligned) and a frustum. The rectangular prism is probably always going to be larger than the frustum itself. Basically if the prism overlaps the frustum completely the overlap function should output 1, and if the prism is completely outside the frustum it should output 0. And hopefully if it partially overlaps it outputs a value between 0-1 that is the amount of overlap. It doesn't need to be a perfect estimate I think, but it should get close and should be correct for cases where its completely overlapping or completely separate.
This will be used to voxelize the prism into a view frustum aligned 3D texture, where each entry in the 3D texture is a small frustum itself.
Any ideas?