Hi,

I'm Angel Rodriguez.

Working in my application I have found a situation I do not know how to
solve.
How to mix ViewDependentShadowMap with any other shader? The idea is that
any child of shadowedscene have some extra shader.

I have tried differents mechanisms:

- VirtualProgram. As in the example of osgVirtualProgram, I can link
multiple shaders at different levels of the scene graph. Shaders merge
right, but it seems that run level node that has the lowest shader in the
graph, and the shadows are on top, so all cuts and properties of vdsm are
lost.

- ShaderAttribute. I tried to run the example of osgShaderComposition with
vdsm, but I still have the same problem above. Differents shaders are
merged as the graph be flown, but vdsm properties are lost.

- Deferred Shaders. As the Kornerr Implementation, OSG Deferred Shading
http://www.youtube.com/watch?v=AjWOSuLxZ68. With this method I have
combined the output of a shader with another implementing several RTT. But
in this case the final result is a texture that should put it in a HUD for
"falsifying" the view of the scene graph. For a good resolution in the
final textura I need to use big textures between shaders (output-input),
leading to hardware limitations on many computers.

What is the best solution to preserve ViewDependentShadowMap properties
adding new shaders at lower nodes of the scene graph.

Any help or advide will be appreciated.

Thannks in advance.

Angel.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to