Hi Josef,

On Sat, 2006-02-11 at 11:40 +0000, Josef Grunig wrote:
> 
> I've noticed a great render speedup after your last changes in
> ShadowMapViewport. Thank you Dirk too, for the hint.
> 
> Although this improvement I think I'll have to inherit the class and
> change it accordingly to my needs. In fact the projectShadowMaps
> method runs my heavy shaders for every light, which is not the nicest
> (and fastest) behaviour. It would be nicer to selectively use two
> different shaders: a fast one for shadow manipulation (used for
> multipass rendering in light loop) and the heavy one used one time to
> render the whole scene with the accumulated shadows.

That's a good idea. 

> Here come some (few) questions...
> 
> Is MaterialSwitch a good choice to switch fast from a shader to another?
> Could MultipassMaterial be a better choice?

Thinking about it, here's my recommendation: Switching just Materials
would be possible, but tricky, as you have to have a way to store the
alternative Materials somewhere, and it still has to work if they are
not specified. 

A more general approach (and some apps/games use this) would be to have
a fully alternative scene/geometry for the shadow rendering (and while
we're at it, have a separate scene to create the shadow map on a lower
detail level in the first place). This could be implemented by having
multiple roots in the Viewport, but personally I would use a different
traversal mask for each pass (map creation, base render, shadow render).
By defaulting them to -1 things would work unchanged right now, and it
allows changing only select objects when necessary. As an additional
bonus it would be the least implementation effort. :)

Andreas, what do you think?  

> When inheriting ShadowMapViewport class must I inherit the base class
> too? or extend directly the base class? ( I'm quite new to C++ and
> OpenSG )

Deriving from OpenSG classes works a little differently from "normal" C+
+. Let's see if Andreas accepts my idea above, maybe you don't have to
worry about it. ;)

        Dirk




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to