Normally when we talk about realistic transparent volumes, we care about refraction (and total internal reflection), and we care about scattering. But there's a much simpler case of volume transparency, where the opacity of the object depends on the distance that light travels through it.
I'm writing a real-time visualization with a forward-rendering pipeline (on WebGL) and I'd like to show transparent solids this way, without having to resort to path tracing. My solids are homogeneous and isotropic, and I'm not interested in scattering or refraction. I just want thin parts of the solid to be very transparent and thicker parts of the solid to be more opaque.
It seems like most real-time transparency algorithms (e.g. OIT) are mainly for getting surfaces/sheets right, instead of volumes, and are more concerned about correct stacking, refraction, and scattering.
It seems like making the colour of the object depend on the thickness of material behind each fragment should be easily achievable with something like an extra depth pass where I draw opaque objects that intersect transparent objects, and back faces of transparent objects, possibly with some extra correction where the notional ray for one pixel goes through a torus-like object more than once. Intuition tells me that this ought to be a standard algorithm, but I don't know of one. Does this algorithm already exist, or do I just need to get my pencil and paper out and write one?