Hello @ all,

I have some more questions about that. First, I understand how to get more than one shadow ;) The Problem is, how to realize it with the osgShadowMap implementation. So I studied the source code of osgShadow. Like Bob said, I need more than one ShadowMap. So I have to create another ShadowMap and set the textureUnit of this new one to another value, e.g. 2. So to get it work I should need also a new shadowed Scene, or? Because if I would use the one I have for my first shadowMap it would have the same lightPosition. Am I right? So I guess I need two ShadowMaps and two ShadowedScenes and then blending them in my program with a fragment shader. Another question is, how do I get the two textures as input for the blending shader out of the two shadowedScenes? I hope these are not such stupid questions ;)

Greets,
Marcus

Bob Kuehne schrieb:
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/


--
----------------------------------------------------------------
Marcus Fritzen                  E-mail: [EMAIL PROTECTED]
University Koblenz              Mobil:  +491786867360
Triererstr. 105, 56072 Koblenz, 
HIWI FB4 Herr Jackel
----------------------------------------------------------------

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

Reply via email to