Re: NoobsDeSroobs and JennyGore:
You should also be able to remove the normalizes since you are just testing the sign of the result and that won’t change with vector length. ( maybe thats the same thing Jenny’s link pointed out but I didn’t watch it). Also, you could try moving that calculation to the CustomUVs so its all done on the vertex shader. It might save something. It might add some distortion to the result but should be ok.
Re: dopiken:
Everything I have read about half angle slicing also talks about using geometry slices but from what I can tell, you don’t need the geometry slices and you could treat it just like any other ray marcher as long as you structure the trace to do it in the right order where it alternates between lighting and density samples in a way that shares them. Maybe its just to make it a bit faster to index into the correct locations?
From my understanding, the biggest drawback to half angle slicing over regular ray marching is that it doesn’t scale super well since you would need two more buffers for each instance in the world since each would have a different slice angle from different viewing angles. Technically shadow volumes have the same limitation where you’d need a different volume for each instance that has a different rotation but you could at least share un rotated instances.
The nice thing about regular old ray marching is that even though it is slow, it is fairly simple and doesn’t have many issues with scaling other than the brute force cost.