There is currently no built-in way to retrieve the data from a render texture. You could create a modifier plugin that attaches a post draw callback to the underlying osg::CameraNode object. From the callback you should be able to read the pixels from the texture into memory.
Do you need the data for real-time purposes (i.e. every frame)? If not, you can workaround the problem by rendering the depth texture to the screen and then capturing the screen to a file.
|