Jump to content
  • Advertisement
Sign in to follow this  
ddlox

Inferred Lighting

This topic is 2758 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

Hi

I read the following doc on Inferred rendering/lighting:
http://graphics.cs.uiuc.edu/~kircher/inferred_lighting_paper.pdf

I would like to implement it using D3D9 to support more dynamic lights. I currently have my engine running in forward rendering using shaders with a max of 3 lights.

I understood the document, but I'm not sure how to start coding it.
I read some articles here regarding this, they do not clearly state a clear point of implementation for fresh start.

I suppose I'm looking for some form of D3D9 tutorial in C++ for this topic. I'm basically trying to know:
- how to create the G-buffer, how to render into it?...
- how to create the L-buffer and render into it?
- how to code DSF?
and how to blend all these buffers really..

I would really be greatful for any form of advancement in this topic.

Many thanks

ddlox

Share this post


Link to post
Share on other sites
Advertisement
I posted an implementation on my blog. It's XNA, but it should be easy enough for you to understand what's going on (and the shaders are the same either way).

Share this post


Link to post
Share on other sites
MJP,

Thank you so much for your reply.

Very good tutorial! Looks like that's what I needed to know ;-)

I will now endeavour to give it a go!

Thank you Mr MJP. Good gift! IT'S CHRISTMUSSS!

ddlox

Share this post


Link to post
Share on other sites
Have you implemented deferred shading or lighting before? If you have then ignore me, but I would suggest doing them before jumping to inferred.

I would say do:
1) deferred shading
2) deferred lighting
3) inferred lighting

This is based off of my experience with the techniques, but you can always dive into inferred at your own risk. The advantage of doing it this way is that each one builds off of the previous one. This means you'll be doing minimal extra work, but breaking down the learning into smaller chunks.

Share this post


Link to post
Share on other sites
Oh OK, I see.

No I haven't done any deferred rendering mode before.
Sounds like your suggestions sit well.

Where would I find tutorials on those deferred modes?
(I know I can google this, but maybe you know one or two that works from your experience?...)

Thanks for your advice as well.

Share this post


Link to post
Share on other sites
I can't really give you a guide. In fact, when I was searching for a guide I had huge problems not being able to find a good one. They all tend to just talk about the idea and have complicated, old, code. This is what I did:

1) Read about deferred shading.
2) Get rendering to a texture working.
3) Get your geometry rendering into textures (G-Buffer pass). Do this by rendering once per render target (yes slow).
4) Get your shading pass (reading the G-Buffer and doing Phong lighting on the data).
5) Get MRT (multiple render targets) working.
6) Then get light volumes (stencil volumes) working for culling out the extra pixels.

You should be able to do the steps above without a comprehensive guide. You can find talks and posts about each of those individual steps. I think that would be the easy path.

Also, once you have the above done, you should be able to move onto deferred lighting and inferred lighting without a guide.

Share this post


Link to post
Share on other sites
Allingm,

It looks very understanding and worth the try. I certainly go in this route.

Thank you SO much ;-)

Share this post


Link to post
Share on other sites
In case you are completely new to Deferred / Inferred rendering, you may might find this "quick walkthrough" handy to get into the mood first:

http://tower22.blogspot.com/2010/11/from-deferred-to-inferred-part-uno.html
Skip the first part, start at the "Foward rendering" picture. Part 2 & 3 are on the same Blog.

Rick

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!