I completely agree with Robert that managing shadows needs to be done at
(way)more high-level than the card.
Shaders come in when looking at the details of applying the shadows, or
(before that step) at the creation of the data needed (shadow maps, edge
finding[potential with the new geometry shaders]).
One slight difficulty I hit when working with shaders, shadows and OSG,
is managing the Uniforms used for parameters in the shaders (some need
to be applied on per-object basis, but the only link with the GLSL
representation that will reside in ShadowTechnique is the name used )
and the Varying used to pass interpolated parameters from Vertex to
Pixel stages (this is a bit of hardware restrictions getting in the way
when using spotlights in my case).
If you have any practical questions, fire away :)
Mihai Radu
Robert Osfield wrote:
Hi Zach,
On 2/8/07, Zach Deedler <[EMAIL PROTECTED]> wrote:
Hello osg users/developers,
Are there any plans to do shadows using shaders? I know hardware
shadowing
is supported on newer video cards.
Many shadow effects are implemented with shaders, the osgdepthshadow
example is based on GLSL.
As far as I'm aware "hardware shadowing" doesn't exist in the form
that you are probably hoping for, I don't know of any future plans
either. There are various extension to help optimize existing high
level shadow routines such as shadow maps and two sided stencil tests,
but this are are very low level components.
Shadowing will be for a long time something that requires the scene
graph to manage at a high level - you need to control the light
sources, the occluders and the shadow scene all in special ways. For
the hardware to do all what is required will require the hardware to
effectively have a high level representation of the scene.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/