Jump to content

  • Log In with Google      Sign In   
  • Create Account





new lighting and shadows...

Posted by BGB, 17 April 2013 · 547 views

well, recently I got around to it:
partly switching from stencil shadows to shadow mapping.

put a video up about it here:


I have ended up using a mixed strategy, generally using the shadow-mapping for the terrain, but stencil shadows for characters.

reasons:
the stencil shadows are kind of glitchy, and were very slow for terrain, so ended up sort of semi-permanently disabled for terrain rendering;
shadows maps don't really work well for characters (low resolution + slow update rate + redraw cost = delayed pixel blobs);
stencil shadows however allowed up-to-date shadows which more precisely show object outlines, making them better suited for things that move around (like models and characters).

costs:
stencil shadows cost in terms of projecting and redrawing shadow volumes.

shadow maps cost in a different way:
the cost of redrawing the depth cube-maps every so often;
the apparent overhead of the shadow maps being used by the shaders, which can be much bigger than expected, especially regarding smaller light sources.

so, it is this funny thing:
the sun can redraw faster and use full-scene shadows;
smaller detail point-lights, if shadow-maps are enabled, are actually considerably more expensive.




new download for engine available here:

http://cr88192.dyndns.org:8080/wiki/index.php/BGB_Current_Status

 

in case anyone is interested...

PARTNERS