I've tried to use the 'constant density' volume shader and the 'volume effects' volume shader to create the appearance of pigmented glass, where more light is absorbed when the light passes through more glass. But with the both of these volume shaders, I have a problem: the opacity of the glass seems to be complete, except when an opaque object is very close behind it. It seems as if the renderer is computing the opacity of the volume shader based on the distance between (A) the point on the glass which is closest to the camera along the ray being sampled, and (
the the point closest the camera on the opaque object behind the glass, along the ray being sampled. What we really want is for the opacity of the glass to be based on the distance between (A) and ©, where C is the next point of the glass surface along the ray, facing away from the camera. Ideally, the renderer would also be able to do this operation repeatedly, so that if the glass had a convoluted shape, the ray could enter the glass, exit it, then re-enter it, and the opacity would be properly calculated each time and added up. Does anyone know how to get any of the volume shaders to do this?