Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!






More Deferred Rendering

Posted by Matt328, 21 September 2011 · 239 views

It's about time for my bi-yearly post here at gdnet, so here goes. I've gotten a single directional light working, a huge milestone after shelving the project for the better part of this year. The directional light is still being rendered directly onto the main render target, and my next task is to break out another render target and texture, and handle combining light rendering passes onto that. Once that is working, I'll need to write another technique in my shader to handle combining the lightmap texture with I'm guessing the color component of the g-buffer to produce the final image.

Attached are some screenshots, because, everybody likes screenshots. #1 is of the separate components of the g-buffer, with just my skydome, which I'm very proud of, and kinda sad it stopped working. #2 is pretty much the same scene, only with the directional light rendered onto the background. #3 shows the directional light after some time has passed and the sun has kind of gone down.

The reason I am so proud of my skydome is because I draw the sun onto the skydome in a pixel shader program, and moved the sun's position across the sky, and use that to calculate the direction of the single directional light I am rendering. I used to have this exposed to a Lua script, which I'm not remembering why I stripped out at one point. Some of you might remember seeing a render of the sun and a terrain I used to have as my avatar on this site a long time ago. That was made with a previous version of this project, probably prototyped in XNA back then. Once I have the rest of the deferred rendering in place, I'll go back and see what needs to be done to draw the skydome. I'm guessing I will just have to draw it last, in its own pass and there will probably be a little refactoring of my renderer class to support that.

I sat down last night and actually came up with a set of requirements, more of a roadmap of things I want to implement for this project. For now it is just a hobby, but the roadmap does lead to it becoming a game in the distant future. Just doing that has given me alot of motivation, seeing a clear beginning and ending point, and how much more fun some of the later features will be to create once I've gotten some of the groundwork out of the way.

Hopefully there will be another entry soon with screenshots of my completed deferred rendering. Possibly with or without a sky.

Attached Thumbnails

  • Attached Image
  • Attached Image
  • Attached Image





December 2014 »

S M T W T F S
 123456
78910111213
14151617181920
212223242526 27
28293031   

Latest Visitors

Recent Entries

PARTNERS