[osg-users] ShadowMap problem...
Wyatt B. S. Earp
wyattbsearp1881 at gmail.com
Thu Nov 12 11:24:39 PST 2009
I also noticed that the vehicles are all black without the terrain... i.e. just the base test texture, as though they are shadowed completely.
> I think I am about to get this straightened out...
> I have implemented the LiSPPSM shadow code in my app. My scene consists
> two vehicles and a terrain. If I don't add the terrain, I can see the
> shadows on the base test geometry and it looks pretty good. The base
> geometry just happens to be sitting below my two vehicles. If I do add the
> terrain, most of the terrain is covered by a big black square, and I no
> longer see the shadows on the base geometry (I can descend below the
> geometry of the terrain and see the base geometry). Is something possibly
> casting a large shadow on the terrain to cause the big black square? I am
> not sure what it could be since I only have the terrain, two vehicles and
> the base geometry. Any suggestions?
> > -----Original Message-----
> > From: [mailto:osg-users-
> > ] On Behalf Of Jean-Sébastien Guay
> > Sent: Wednesday, November 11, 2009 2:33 PM
> > To: OpenSceneGraph Users
> > Subject: Re: ShadowMap problem...
> > Hi Wyatt,
> > > With the debugHUD in the ShadowMap example, there was just
> > > a window which appeared to display the shadow map in gray-scale, but
> > >
> > in the
> > > LISPSM example, there appears to be two sub-windows in the debughud
> > >
> > window
> > > (not in gray-scale). What are these displaying?
> > >
> > The left side is the shadow map itself, and the right side is a render
> > of the bounds analysis render pass (the
> > LightSpacePerspectiveShadowMapDB
> > technique - Draw Bounds - makes a 64x64 render pass before the actual
> > shadow pass to see if the shadow map bounds can be further reduced -
> > Wojtek can tell you more about it, or search the archives for details).
> > > Am I supposed to, basically, copy the shader code from StandardShader
> > >
> > map
> > > and add it to my shaders and turn off the LISPSM shaders?
> > >
> > You only need to use some parts, those that relate to the shadow test.
> > The rest of your shader can be what you want - most of the shader code
> > in StandardShadowMap.cpp is just standard lighting, which you might be
> > doing differently. You should copy the DynamicShadow function for both
> > vertex and fragment shader (whether you want to keep it in a function
> > or
> > not, up to you) and then look at the place where it's used and do
> > something similar.
> > Read the shaders, you should understand.
> > J-S
> > --
> > ______________________________________________________
> > Jean-Sebastien Guay
> > http://www.cm-labs.com/
> > http://whitestar02.webhop.org/
> > _______________________________________________
> > osg-users mailing list
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> > openscenegraph.org
> osg-users mailing list
> Post generated by Mail2Forum
Read this topic online here:
More information about the osg-users