On Fri, Oct 26, 2012 at 7:11 PM, Glenn Waldron <[email protected]> wrote:
> > > How are they stored? Per vertex? Or is it some kind of regular grid that > does distortion correction? Is the computation something you could do in a > vertex shader if the shader can access to the camera parameters? > Per vertex. UV coordinates for vertices that are not textured from a given foto are set to a special value (-1). The computation could be done in a shader I suppose, though I'm not completely sure about the constraints of a shader. I'm used to general purpose computing on GPUs in cuda and opencl and in both languages its possible: it requires at least a loop construct and floating point arithmetic. On the CPU I additionally perform a visibility test for the vertex, but as others have noted invisible vertices wouldn't get in into the vertex shader stage. This sounds like a clever idea, but I have to keep exporting the mesh in mind. When exporting I think I should have the UV coordinates ready on the CPU. Is there a way to transmit the output of the shader (i.e vertex ST coordinates) back to the CPU? Best, Christoph
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

