[osg-users] ShadowMap question.

2008-10-07 Thread hui
Hi, I work on project need shadow between avatar and model, and I add shadowmap as the example code but it doesn't work. I read the shadow example and seems that the glsl shader only has two texture unit, one for shadowbase and one for shadowTexture. Do I need to assign my own texture unit

Re: [osg-users] ShadowMap question.

2008-10-07 Thread Roger James
Hui, hui wrote: Hi, I work on project need shadow between avatar and model, and I add shadowmap as the example code but it doesn't work. I read the shadow example and seems that the glsl shader only has two texture unit, one for shadowbase and one for shadowTexture. Do I need to assign

[osg-users] ShadowMap Question

2007-11-03 Thread Andreas Goebel
Hi, after applying Mihai´s Fix for ShadowMap (thank you!) I am able to use ShadowMap in my program. There are two issues: - triangles only cast a shadow when their normal is directed towards the light. While this is, of course, the desired behaviour for real models, it is not so nice when

Re: [osg-users] ShadowMap Question

2007-11-03 Thread Robert Osfield
On Nov 3, 2007 2:47 PM, Andreas Goebel [EMAIL PROTECTED] wrote: Hi, after applying Mihai´s Fix for ShadowMap (thank you!) I am able to use ShadowMap in my program. There are two issues: - triangles only cast a shadow when their normal is directed towards the light. While this is, of

Re: [osg-users] ShadowMap Question

2007-11-03 Thread Andreas Goebel
Disable back face culling. Thank you, Robert. This works, though I had to search a while where to set this: In the code of ShadowMap, the following is set: osg::ref_ptrosg::CullFace cull_face = new osg::CullFace; cull_face-setMode(osg::CullFace::FRONT);