[osg-users] osgShadow question

Wyatt Earp wyattbsearp1881 at gmail.com
Mon Nov 9 10:55:49 PST 2009


"What do HUDs have to do with this?"

The fragmentShaderSource_debugHUD and fragmentShaderSource_debugHUD_texcoord
shaders listed at the top of the cpp with the other two shaders....


W


-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
Jean-Sébastien Guay
Sent: Monday, November 09, 2009 12:47 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgShadow question

Hi Wyatt,

> Which shader is the basic shader, fragmentShaderSource_noBaseTexture or 
> fragmentShaderSource_withBaseTexture? 

Depends on whether your object has a texture or not. Although now, since 
texture lookups are so cheap these days, I would suggest you save 
yourself some aggravation and just apply a white 1x1 texture to the top 
of your scene graph (which will thus apply to all untextured objects but 
won't change anything in their appearance) and use only one shader, the 
withBaseTexture one.

See the code for osgShadow::ShadowMap for an example of such a texture 
set up.

> I assume it isn’t one for HUD.


Hope this helps,

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list