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 <[email protected]>

> 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 <[email protected]>
>
>> 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
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to