Hi all,

I actually posted about a similar issue 3 days ago, and included
screenshots and a cpp file, but my post never made it on to the list.
It may have been filtered due to attachments on first post.

Anyway, I think there is a general regression in osgShadow from 2.8.3
to 3.0.1.  The problem that I was seeing was with SoftShadowMap where
the shaded areas are transparent.  It is easily reproducible in the
osgShadow example by making the SoftShadow technique default, and
adding GL_BLEND to the default model 3 stateset.  If GL_BLEND is
enabled, shadows make the receiver object transparent in the areas
where the shadows are projected.

I tracked this down to a change in the shader code where shadows
values were changed from a vec4 to a float.  Using the original shader
from 2.8.3 works fine, but the current one is broken.

Cheers,
Morné

On Fri, Dec 2, 2011 at 6:53 PM, Wojciech Lewandowski
<w.p.lewandow...@gmail.com> wrote:
> Hi, Guys,
>
> I think I see the reason why Robert commented it. For spotlights ambient
> factor should be attenuated with distance from light. It would be hard to
> compute attenuation in frag shader  without assistance of vertex shader. I
> would bet it would be possible but very tricky, though. Anyway, IMHO when
> that line is commented its worse because such ambient factor is both wrong
> for directional and spot lights.
> That issue again proves that there is no silver bullet for shadow technique
> shaders. Depending on what your app does you may need different set of
> shaders, if not whole technique.
> So maybe you guys should consider passing in your own shaders (copied from
> 2.8 version) to make that look  right again...
>
> Cheers,
> Wojtek Lewandowski
>
>
> 2011/12/1 Wojciech Lewandowski <w.p.lewandow...@gmail.com>
>>
>> Hi, Michael,
>>
>> Well, then I guess addition of gl_FrontLightProduct[0] should be
>> uncomented. And thats a missing piece of the puzzle... SVN Blame shows that
>> Robert commented it in 12737 rev on 29th of  July. I guess its time to ask
>> Robert what to do with this.
>>
>> Cheers,
>> WL
>>
>>
>> 2011/12/1 Michael Guerrero <mjgue...@nps.edu>
>>>
>>> Hi Wojtek,
>>>
>>> It certainly did seem as though I completely missed the addition with
>>> gl_FrontLightProduct[0].ambient.
>>> Unfortunately what happened was that after I copy/pasted it in the
>>> message I removed the quotes around it and more importantly the comment
>>> characters "//".  Here is a link to the file in question:
>>>
>>> http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/tags/OpenSceneGraph-3.0.1/src/osgShadow/StandardShadowMap.cpp
>>>
>>> FYI, that piece of code looks the same on the trunk:
>>>
>>> http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgShadow/StandardShadowMap.cpp
>>>
>>> ------------------
>>> Read this topic online here:
>>> http://forum.openscenegraph.org/viewtopic.php?p=44170#44170
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to