Hiya, This is somewhat related to my last thread (maybe I should have just explained the situation from the beginning).
I'm trying to create a shader that does billboarding for hundreds of objects at once (where using AutoTransform is too slow). I merge all these objects together to reduce the number of draw calls, and pass along specific vertex attribute data (specifically model-space relative vertex data when I want the billboard center to be the model's center) and uniforms (camera vectors) to do the required billboard transform in the shader. This kind of works, but the result is 'jittery' compared to AutoTransform. I don't know whether its the way I specify the uniform update callback or if its related to reduced shader precision (the coordinates I used are all close to the origin though, so I hope that's not the case) or something else entirely. I created a minimal example that reproduces the issue [1]... (just copy->past->compile). The example shows a square billboarded with AutoTransform working perfectly, and my not so great example directly behind it. [1] https://gist.github.com/4582261 * Does anyone know why my example billboard implementation causes that jitter/delay? * Or, has anyone created a better shader that can do billboarding for batched geometry (and if so, could they maybe share how)? Preet
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

