Multipass lights and shadows

Started by
5 comments, last by FeverGames 15 years, 4 months ago
Hey guys, i am not sure if this question is asked before, but to be honest i find it quite hard to search and find information about this subject. I was wondering if there are any people that can draw me a diagram, psuedo code, example codes or links to whatever pdf's and sites about multipass rendering with shadows and so on... I have no clue how i could approach this subject with the best and most optimized pattern... Thanks for the information
Advertisement
http://www.riemers.net/eng/Tutorials/XNA/Csharp/series3.php

I like this guy's tutorials. He uses XNA, but he uses shaders for rendering, so the concepts are pretty adaptable.
yes i have found his tutorials before it is really awsome! but he doesn't really get into multipass rendering, and totally not about managing multipass lights and shadows.
That link I posted should be the first in a series on that exact topic: How to render a shadow map to a seperate render target and then combine them.

Unless I am missing something, that is the basics of what you are asking for.
of course of course i am sorry i should have been more specific to what i am aiming at. I was wondering how the shadowmaps and the lights can be bound easily, since texture arrays are not possible in shader model 3. Would the best option be to use a sort of texture atlas for example? since a pointlight might need two shadow maps...

and is this done by
if(Light[X].Type == 1(pointlight)){    doPointLight(params);}

for example?
With multipass lighting it's pretty simple. Since you're doing one light at a time, you only need one shadowmap texture bound to the device at a time. Or are you doing more than one light per pass?
Well that's the thing. I am still in the sort of 'designing' part of the whole system. We are right now depending on deferred shading and i was curious on how to do the multi pass rendering. I thought it would be possible to have more then one light per pass with a shadow map attached to it, but i am not sure if this would be really optimized and all.

Say that our engine can know what models are in what boundingVolume of lights. So the whole culling/rendering would be pretty optimized.

Is one light per pass an optmized way of working? Say i'd do a lightless pass first so the depthbuffer is filled, making the next few passes less heavy.. is that good?

This topic is closed to new replies.

Advertisement