Re: [Algorithms] lights/shadows rendering architecture
Brought to you by:
vexxed72
|
From: Jon W. <hp...@mi...> - 2005-08-17 16:35:45
|
> 3) 1 pass = n lights, shadow mapping done in scrreen space at the end > This is a variation of 2). After the rendereing is done, i render a shadow This will look as bad as the "darkening quad" way of doing stencil shadows. Back-facing surfaces will be darkened by the N dot L equation, and then again by the shadow map. > How do you guys handle the lights and these typical problems ? What would be > a reasonable number of lights casting shadows ? You can get away with only sunlight casting shadows, if you don't need cinematic effects of actors moving in front of torches, etc. You can also reduce the cost of each pass by being stingy about what you actually render for each light -- cull at outer distances, prefer tighter spotlights, etc. Then let the artists make it run well enough for the look they get. (Contrary to popular belief, I've found that if the artists can get good, interactive performance tools and reports, they are quite capable of achieving reasonable frame rate) However, "reasonable" depends a lot on your target hardware, scene composition, frame rate requirements, etc. On modern hardware (sm 3.0 cards, etc) the cost of a single simple pass might not be as high as you'd think. Especially if you turn off RGB rendering and only render into depth. Cheers, / h+ -- -- The early bird gets the worm, but the second mouse gets the cheese. |