Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-15 Thread Trajce Nikolov NICK
Hi Michael, this sounds good but I just tried and it seam without changing the OSG code it is not possible as well. The StandardShadowMap does not holds any instance of the StandardShadowMap::ViewData where the _stateset is kept. Nick On Tue, Apr 15, 2014 at 7:29 AM, michael kapelko

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-15 Thread michael kapelko
Well, you said you want osg::Program at StandardShadowMap.cpp:544. That osg::Program is set to _stateset just on the next line. So if osg::Program of _stateset doesn't work for you, there's no use exposing it. 2014-04-15 17:50 GMT+07:00 Trajce Nikolov NICK trajce.nikolov.n...@gmail.com: Hi

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-14 Thread Jaime
Thanks kornerr. I was checking your code, but the problem is that I don't want deferred shading, because I need transparency too. I think I should use LightSpacePerspectiveShadowMap because there I can use setShadowVertex/FragementeShader. Nick helped me with his code (thanks again Nick!),

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-14 Thread Trajce Nikolov NICK
Knowing the problem a bit I think the question is how to access the osg::Program of the shader technique for binding vertex attributes like the binormal and tangents arrays. Nick On Mon, Apr 14, 2014 at 11:07 AM, Jaime xatp...@hotmail.com wrote: Thanks kornerr. I was checking your code, but

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-14 Thread Trajce Nikolov NICK
I looked at the code of StandardShadowMap.cpp and I think this object at line: 544 osg::Program has to be exposed to the interface as well. Robert, will You accept such a change, it is minor but will change the interface with one getProgram() method and will not brake anything. This case is good

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-14 Thread michael kapelko
I would derive from StandardShadowMap to gain access to _stateset variable. Then, osg::StateSet::getAttribute can return osg::Program it contains. 2014-04-14 22:44 GMT+07:00 Trajce Nikolov NICK trajce.nikolov.n...@gmail.com: I looked at the code of StandardShadowMap.cpp and I think this

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-11 Thread Trajce Nikolov NICK
Hi Jaime, yes, I have such an example. If you have the bump mapping GLSL code ready you can mix it with the shadow map shaders and set it to your shadow mapping technique - there are methods like setShadowVertexShader/setShadowFragmentShader/setMainVertexShader/setMainFragmentShader Nick On

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-11 Thread Jaime
Thanks for your response Nick. Yes, I have my bump shader. But I don't know how to combine. Please, could you give me an example with code?? Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58878#58878

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-11 Thread Trajce Nikolov NICK
yes. I will ping you on email Nick On Fri, Apr 11, 2014 at 11:05 AM, Jaime xatp...@hotmail.com wrote: Thanks for your response Nick. Yes, I have my bump shader. But I don't know how to combine. Please, could you give me an example with code?? Thanks! -- Read this

Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-11 Thread michael kapelko
Hi. Here's my example: https://bitbucket.org/kornerr/osg-deferred-shading ( http://youtu.be/AjWOSuLxZ68 ) It has 2 implementaions: plain OSG and EffectCompositor (not part of OSG). The basic idea behind my implementation is to: * render the shadow only information to texture; * do all the rest