> Anyway, for the basic display, the transform works... Hooray for shaders!
> But I have an implementation bug or short coming. I am not using a > fragment program. ... Is there something I can do to fix this > problem? Use a fragment shader :) Seriously, if you've managed to get your head around the vertex shader, a simple fragment shader should be trivial. If you're just colouring points, then you only need to pass in an RGB value to the vertex, and that gets passed through to the fragment shader; it's exactly the same as passing in any other data, shaders can cope with most per-vertex data you want to throw at them. > One of the things I've been hoping to do is Intersection/Picking on my > lines once Robert adds the support. ... I don't know if there is a good solution > to this. You've tasted the fruit of the shader tree now; there's no going back, but you don't have to be banished from paradise... There's no reason why you can't pass in the position of the cursor (in any space you choose), transform it into the same space as your vertices in the vertex shader, and test that vertex's position against this constant. Now, getting data _back_ from a shader is a bit trickier, but a relatively simple method is to have a 1 pixel texture, and write out some sort of index to it. Have a look at the articles on http://www.gpgpu.org/, and if you're feeling flush buy "GPU Gems" and/or "GPU Gems 2". They're a bit Cg-centric, but the principles are the same. John Donovan Sony Computer Entertainment Europe http://www.scee.com ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify [EMAIL PROTECTED] This footnote also confirms that this email message has been checked for all known viruses. ********************************************************************** Sony Computer Entertainment Europe _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
