Ok... so I did what you suggested mostly... I took the osgshadow example,
add my geometry and it worked.  I added another shader on the root node of
the scenegraph, because in my app, I do that.  I took the shaders from
ShadowMap.cpp and put them into vert/frag files and loaded them into their
respective shaders.  That worked too.

 

In my application, when I load those shaders from ShadowMap.cpp and use
them, I see a change in the lighting but it isn’t what I expect.  Rather
than the objects casting shadows on the terrain, it looks like a shdow is
being cast over the objects, but it isnt'being cast on the terrain.  The
best way I can describe it is that it looks like the objects are in the sun
then a cloud floats between the sun and the object...  I don’t think a
picture will show what I mean, but here are 3 pictures with the shadow
moving progressively to the left over the object... note the white building
in the front gets darker.  But now shadows on the terrain.

 

cid:image001.png@01CA692E.7A38B7F0

 

cid:image002.png@01CA692E.7A38B7F0

 

 

cid:image003.png@01CA692E.7A38B7F0

 

W

 

 

 

> -----Original Message-----

> From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-

> boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay

> Sent: Thursday, November 12, 2009 1:45 PM

> To: OpenSceneGraph Users

> Subject: Re: [osg-users] ShadowMap problem...

> 

> Hi Wyatt,

> 

> > Any suggestions?

> 

> Not really. At this point you'll probably have to trace into OSG to

> make

> sure the shadow map traversal is getting to the right objects (i.e.

> your

> masks are set correctly), and check your shaders (perhaps even try with

> the basic shaders that LISPSM uses by default for starters). Also, try

> to start with the osgShadow example, and work up progressively to

> something similar to what you have in your app, and perhaps in the

> process you'll find out what's not working. If not, then at least

> you'll

> have a small app that can demonstrate the problem, which we might be

> able to help with.

> 

> Hope this helps,

> 

> J-S

> --

> ______________________________________________________

> Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com

>                                 http://www.cm-labs.com/

>                          http://whitestar02.webhop.org/

> _______________________________________________

> osg-users mailing list

> osg-users@lists.openscenegraph.org

> http://lists.openscenegraph.org/listinfo.cgi/osg-users-

> openscenegraph.org

<<image001.jpg>>

<<image002.jpg>>

<<image003.jpg>>

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

Reply via email to