Re: [osg-users] Multitexture in Shader

2011-05-04 Thread Nan WANG
i have got the same problemdo you have solution?

Thank you!

Cheers,
Nan

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





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


Re: [osg-users] Multitexture in Shader

2011-04-11 Thread SkullCheck
Hi Linda,

Did you ever get this to work? I'm seeing the same problem: Specifying
multiple textures and then accessing them in the (fragment) shader
always returns the data from the first texture.

Cheers,
Chris

On Tue, Mar 15, 2011 at 2:49 PM, Linda Lee zenith...@hotmail.com wrote:
 Hi,

 Has anyone encountered this problem where only the first texture at layer 0 
 seems to successfully passed to the shader code but not the other textures 
 with textureID of 1, 2, ... ?

 Thank you!

 Cheers,
 Linda

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





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

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


Re: [osg-users] Multitexture in Shader

2011-03-16 Thread Sergey Polischuk
Hi, Linda

If it works in your code, you can take screenshots with 
osgViewer::ScreenCaptureHandler (in osgViewer/ViewerEventHandlers header) 
without using osgscreencapture stuff.

Cheers,
Sergey.

16.03.2011, 08:53, Linda Lee zenith...@hotmail.com:
 Hi,

 I did some testing.  The code seems to work properly until I try to put them 
 into the osgsceencapture sample to do sceenshot.  It seems that only the 
 first texture is successfully passed to the shader program.  Any idea why it 
 does not work?  Or is there a way to pass multiple textures into the shader 
 program and still able to work in the osgscreencapture code and to do 
 screenshot?

 Thank you!

 Cheers,
 Linda

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

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


[osg-users] Multitexture in Shader

2011-03-15 Thread Linda Lee
Hi,

Has anyone encountered this problem where only the first texture at layer 0 
seems to successfully passed to the shader code but not the other textures with 
textureID of 1, 2, ... ?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Multitexture in Shader

2011-03-15 Thread Sergey Polischuk
Hi, Linda

Check if you set up texture attributes, modes and uniforms values for samplers 
correctly.

Ex.:
stateset-setTextureAttributeAndModes(0,textureOnUnit0, 
osg::StateAttribute::ON);
stateset-setTextureAttributeAndModes(1,textureOnUnit1, 
osg::StateAttribute::ON);
stateset-addUniform(tex0,0);
stateset-addUniform(tex1,1);

in shader:
sampler2D tex0;
sampler2D tex1;
etc.

Cheers,
Sergey.

15.03.2011, 16:49, Linda Lee zenith...@hotmail.com:
 Hi,

 Has anyone encountered this problem where only the first texture at layer 0 
 seems to successfully passed to the shader code but not the other textures 
 with textureID of 1, 2, ... ?

 Thank you!

 Cheers,
 Linda

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

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


Re: [osg-users] Multitexture in Shader

2011-03-15 Thread Linda Lee
Hi,

I did some testing.  The code seems to work properly until I try to put them 
into the osgsceencapture sample to do sceenshot.  It seems that only the first 
texture is successfully passed to the shader program.  Any idea why it does not 
work?  Or is there a way to pass multiple textures into the shader program and 
still able to work in the osgscreencapture code and to do screenshot?

Thank you!

Cheers,
Linda

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





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