[osg-users] ParallelSplitShadowMap (PSSM): Shadow Quality much better, without unsing PolygonOffset :-)

Adrian Egli OpenSceneGraph (3D) 3dhelp at gmail.com
Thu Sep 4 23:41:51 PDT 2008


Hi all,

i came around reviewing my code, and found now finally a solution to remove
the polygon offset issue. as we all know the polygon offset has a different
behaviour on different GPU system (ATI, NVidia) and this make the use of
polygon offset complicate. so i looked for a solution to remove this offset.


i changed the shader, also the filtering (default: on) use now a correct 3x3
filter:
 1 0 1
 0 2 0
 1 0 1

div: 6

of course a better one would be
 1 2 1
 2 4 2
 1 2 1

div: 16
but this isn't as performant as the simple filter above is. because we need
only 5 texture lookups instead of 9, and the result is still good, if you
wish we can add a enum to change the pcf filter type once, if there is a
need.


testet on NVidia Quatro 570M and on ATI Radeon X1600


please enjoy it.


regards adrian

-- 
********************************************
Adrian Egli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080905/e6925a5f/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ParallelSplitShadowMap.cpp
Type: text/x-c++src
Size: 40796 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080905/e6925a5f/attachment-0002.cpp>


More information about the osg-users mailing list