Jump to content
  • Advertisement
Sign in to follow this  
FeverGames

Multipass lights and shadows

This topic is 3674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!