[osg-users] Draping polygons on existing objects using stencil shadow volumes

Hartwig Wiesmann hartwig.wiesmann at skywind.eu
Thu Apr 5 15:35:42 PDT 2018


I would like to implement draping of objects using stencil shadow volumes. To do so I have to do the following steps:

1) Draw the scene's objects
2) Start multi-pass rendering for the stencil shadow volumes
2a) Clear the stencil buffer
2b) Set the attributes for the first pass and draw the volume mask
2c) Set the attributes for the second pass and draw the to be draped polygons

As also other parts of the scene might use the stencil buffer I cannot just clear the stencil buffer.
Any ideas how to solve this issue? Or do I have to move all this stuff in the last run render bin?

I had a look at ShadowVolume (that should be similar) but I have no clue what kind of manipulations with respect to the render stage are done and why they are done (in "cull") because I am not so familiar with render bins and render stages.

Thank you!


Read this topic online here:

More information about the osg-users mailing list