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

michael kapelko kornerr at gmail.com
Tue Oct 27 04:59:26 PDT 2015


Hi.
I failed to implement shadows myself and failed to understand osgShadow, so
ended up simply using it in a separate pass, as you outlined. Can't help
here, sorry.

2015-10-27 16:02 GMT+07:00 Sebastian Messerschmidt <
sebastian.messerschmidt at gmx.de>:

> Hi folks,
>
> Sorry for hijacking this thread, but after a relatively long time I'll
> have to work on deferred shadow mapping again.
>
>
> I did sample implementation using mentioned osgRecipes' EffectCompositor
> some time ago: <https://bitbucket.org/kornerr/osg-deferred-shading>
> https://bitbucket.org/kornerr/osg-deferred-shading
>
>
> I checked out the example and it is working, but not really deferred, as
> the shadows are applied by rendering the scene three times ( gbuffer pass,
> from the light source, applying the shadow map to the scene) if I
> understood the code correctly.
> It is that last part which ruins it. I've been crawling around in the
> ShadowMap code but I'm lost on how to do the following:
>
> 1. Use the culling/rendering to shadow map texture-code which is already
> there
> 2. Get the matrix used by 1.) into an uniform
> 3. NOT let the shadow-technique render apply to the scene, but leave the
> application to me (for instance in a later pass)
>
> I'm simply to stupid to find the appropriate piece in the code, which
> applies the shadow map.
>
> cheers
> Sebastian
>
>
> 2015-09-16 13:35 GMT+07:00 Trajce Nikolov NICK <
> trajce.nikolov.nick at gmail.com>:
>
>> Hi Daniel,
>>
>> here is some work from Wang Rui (the effectcompositor) that has DR
>> implemented with some sample shaders
>>
>> https://github.com/xarray/osgRecipes
>>
>> Nick
>>
>> On Wed, Sep 16, 2015 at 8:32 AM, Daniel Schmid <
>> <daniel.schmid at swiss-simtec.ch>daniel.schmid at swiss-simtec.ch> wrote:
>>
>>> Hi Sebastian
>>>
>>> I read in lot of posts that you have experience with deferred rendering
>>> in osg. Could you share some of your insights and probably even samples or
>>> code snippets that could bring some more light into this topic?
>>>
>>> I'm basically interested in:
>>> - construction of G-Buffer
>>> - integration of Shadow (VDSM), maybe even for multiple lights?
>>> - choice and integration of postprocessing framework
>>> - antialiasing method / shader
>>>
>>> It would be of so much help!
>>>
>>> Thank you!
>>>
>>> Cheers,
>>> Daniel
>>>
>>> ------------------
>>> Read this topic online here:
>>> http://forum.openscenegraph.org/viewtopic.php?p=65140#65140
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users at lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>>
>>
>> --
>> trajce nikolov nick
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> _______________________________________________
> osg-users mailing listosg-users at lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151027/21095864/attachment-0003.htm>


More information about the osg-users mailing list