[osg-users] [osgPPU] Problem Passing Lookup Table to Processing Unit

Art Tevs arti_tevs at yahoo.de
Tue Nov 17 06:33:17 PST 2009


Hi Harash,

First take a look into documentation of osgPPU. osgPPU is very well documented, look here (http://projects.tevs.eu/osgppu and http://www.tevs.eu/doc/osgPPU/namespaceosgPPU.html)
If this does not help you, then take a look into examples. Every example has tons of comments to help new users to understand how certain things works.



Harash Sharma wrote:
> 
> ...However when I attach the shader to the processing unit, the results are unexpected and I see the openGL warning. 
> 
> Do I have to use UnitTexture to pass the lookup table? I am totally stuck in dark. Please help.
> 


Attaching a shader to a unit does works fine. In every example you can see this behaviour. So it might be that you are doing something wrong with the setup of your shader. 

If you want to have a texture as input to any unit, then you have to use UnitTexture instead. You just put a UnitTexture under the processor and call unitTexture::setTexture(_myTexture) with your texture. Then any unit which is a child of that unit texture will have this texture as input. 

Regards,
art

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19734#19734







More information about the osg-users mailing list