On Jun 19, 2007, at 8:51 AM, Marcus Fritzen wrote:

I am trying shadowing my scene with more than one lightsoure. Therefore I create just another lightsource and addchild these also to my shadowedScene. The result is, that only the last lightsources is used. Is it possible to use more than one lightsource at the same time?

hi marcus,

yes, you can have as many shadows generated as you like, assuming you
have card memory and performance available to generate and render with
these. here's what happens:

 1) generating each shadow map requires a rendering of the
    scene and storage of depth info

 2) generating the shadowed scene involves using each of these
    shadow maps and blending of their results. it's simplest
    to do this via a shader.

so, depending on what code you're using to render the final scene, you'll need to adjust both the shadow generators (to bind to alternate texture units), and
also the shader/blend state (to use these multiple shadow textures.)

bob


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to