[osg-users] my hope

2013-10-12 Thread ??????
dear I hope get the dairy openscenegraph information evenyday. best wishes to you.___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] How to add shadows to deferred shading?

2013-10-12 Thread Marcel Pursche
Hi, No shadow with 0,0,1 is a bug. I'm not sure where ist comes from. The length in the shader was a test I forgot to revert this change. -viewspacePosition.z shold be used instead in both cases. 1000.0 is my far plane, i write the depth value unormalized [near, far]. Thank you! Cheers, Marcel

Re: [osg-users] mixing OpenGL with OSG - textures

2013-10-12 Thread Trajce Nikolov NICK
Hi Aurelien, I am seeing you are using custom API for the textures. My case was pure OpenGL (which I don;t think it makes any difference). I found the way to reuse the texture I am creating and only installing new Texture::TextureObject from my initial attempt. The not implemented release is

Re: [osg-users] How to add shadows to deferred shading?

2013-10-12 Thread michael kapelko
Hi. I've been thinking some more about my misplaced shadows, and I finally came to realize that the fragment shaders of the first pass (that fill G-buffers) produce fragments in Screen space, not in World space, and thus all G-buffers contain Screen space fragments. That's why shadow Screen space

Re: [osg-users] How to add shadows to deferred shading?

2013-10-12 Thread Marcel Pursche
Hi, In your current implementation you store your fragment positions in world space and use them for lighting in the final fragment shader. If you pass a matrix uniform to this pass, that translates from world space to screen space of the light pass, you can calculate your shadow texcoords. So

Re: [osg-users] singleton instane

2013-10-12 Thread Sajjadul Islam
Hi David, Thanks for the suggestion of the singleton design . I tried to design a template base class as follows : Code: namespace osgOpenCL { /** This class helps to build the singleton design pattern. Here you have full control over construction and deconstruction of the object.