Idea Time. I don’t know if this is the right place for this, but lets try.
I was thinking about 3D textures this morning and wondering if there were a way to use them for shadow-casting. This is not a fully formed idea, so just hear me out.
Picture a 3D figure, such as a chair, represented in the volume of a 3D texture. All the pixels are transparent, excpet for some black pixels in the middle of the volume, which make up the 3D shape of the figure. In an aliased, lego blocks - looking fashion.
Now, if this texture volume could be projected from any arbitrary vector, onto a surface, it would be the correct description of a shadow cast by such shape. Adding some blur to the volume’s data, plus linear interpolation on the output, would smooth out the jaggies of it’s aliased nature. Plus it would give the shadow a nice, soft edge.
Problem is, how could this projection be done? Rendering the 3D texture by specifying a slice of the volume that is perpendicular to the projection vector would just render the data that intersects along the slice. Not the whole volume as seen from that vector.
This could be accomplished by rendering multiple parallel slices, sampled at evenly distributed distances through the volume. However, this sounds like it would negate the speed bonus of using a texture for this purpose. Might as well have just projected the 3D geometry itself instead, via classic shadow-casting techniques.
Can anyone see what I am picturing?
A way to apply a 3D texture as a whole, rather than just a slice?
This may just be a dead end, but I thought I would run it up the flag pole and see who salutes.