This request appertains to the Raster geometry class: javax.media.j3d.Raster
There is not currently a mechanism to retrieve a Raster geometry's 3D position
from a programmable shader. This is because the Z-coordinate is mapped onto the
image plate in order to render the raster image properly. It would be very
useful to have a vertex attribute passed in with the Quad used to fill a raster
texture that specifies the 3D position (i.e., via glVertexAttrib3f).
Referencing the JOGL pipeline (because of its clarity), the method
textureFillRaster renders the Raster image to the framebuffer using a Quad. The
current quad uses texture coordinates and vertices. A nice enhancement would be
to also pass in vertex attributes with each vertex that specifies the 3D
position. Using the same 3D position for all vertices would ensure that the
interpolation provides uniform results.
Since the Raster class does not permit user-defined vertex attributes, it is
also acceptable to make some design decision as to what this attribute is called
and how it can be referenced from a shader.
This enhancement would make it possible to replace the fixed-functionality
rendering pipeline for Raster objects with customized shaders that use logic
based upon distance from the 3D position to other locations, such as the eye.
Practical applications include distance-based label attenuation and others.