Hi Christoph,

On 26 October 2012 17:04, Christoph Heindl <christoph.hei...@gmail.com> wrote:
>> Since you will also need to use the TexGen capabilities (discussed earlier
>> in this thread) to generate the correct texture coordinates for each pass,
>> you might use an osg::TexGenNode in place of the osg::Group. TexGen will
>> generate the UV coordinates for you.
>
>
> I don't think so, as I already have the UV coordinates. I calculate them
> myself in order to allow for camera lens distortions and such. I think that
> TexGen (EYE_LINEAR) mentioned previously assumes a plain pinhole camera
> model without regarding effects from lens distortion.

If you use your own shaders then you'll be able to compute the ST
coordinates (what OpenGL calls the UV coords) and do something more
sophisticated than standard OpenGL TexGen.

For cases where the ST coordinates can't be computed in object or eye
coordinates then you'll need to rely upon the UV coords that you've
computed.  The OSG supports as many texture units as the underlying
OpenGL implementation supports and will scale up to 8 without problem
on most hardware/drivers.  Going this route would be the most straight
forward.

> Sounds good, just the name (Effect) puzzles me. From looking at the
> documentation it seems that actually a lot of effects such as outlines, glow
> etc are done with that.

I wouldn't recommend considering the osgFX library, it'd just
overcomplicated things for no gain.

Also while you could go the multi-pass route I would recommend it as
the multi-texturing route should get you far enough along without
needing to go for a more complicated multi-pass solution.  The OSG
supports multi-pass cleanly but it's always more complicated than
using multi-texturing.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to