Hello Michael, On 05/21/2014 10:22 AM, Michael Raab wrote: > > For now I have implemented the use of ShadowEngines. I'll look into > the details of the ShadowsStages in the next days.. > After some testing the results of the ShadowEngine's seems to be not as > good as the shadow technique's in OpenSG1.8 were. Therefore I switched > to the ShadowStage approach.
yes, not all the "filtering" techniques to improve shadow quality are implemented as engines. > Works as expected in principle, but with shadows enabled we loose > anti-aliasing. I guess multisampling needs to be enabled for the > Framebuffer object that renders to main view. I already looked at the > code but I have no idea how integrate that in a clean way. The relevant code should be in ShadowTreeHandler (and derived classes). The ShadowStage implements an algorithm that is slightly more involved: 1) render scene into FBO (color map fbo, for PCF filtering this is done in PCFShadowMapHandler::createColorMapFBO, other techniques have similar functions). 2) render a shadow map for each light source (e.g. PCFShadowMapHandler::createShadowMapsFBO). 3) Combine all shadow maps into one shadow factor map (e.g. PCFShadowMapHandler::createShadowFactorMapFBO). 4) Combine the color image from step 1 with the shadow factor map from step 3 an render to the target buffer (application framebuffer or FBO), ShadowTreeHandler::setupDrawCombineMap2. I believe the buffers that should use multisampling are the color map fbo from 1) and possibly the shadow factor map from 3). These buffers are generated by the ShadowTreeHandler derived classes [1]. They all get a pointer to the owning ShadowStage, where a "UseMultisampling" flag could be added - unfortunately all the ShadowTreeHandlers would need to be adjusted to evaluate the flag. Cheers, Carsten [1] I haven't checked if a helper function in the base class for setting up common types of buffers makes sense. That would shrink down the number of places that require adjustment to evaluate a "UseMultisampling" flag. ------------------------------------------------------------------------------ The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime! http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users