Game Development Community

dev|Pro Game Development Curriculum

TGEA Deferred Rendering and PSSM, Reloaded

by Adrian W · 08/01/2009 (2:14 am) · 11 comments

Wow, that's a long time between blogs (www.garagegames.com/community/blogs/view/16909), but this project is not dead, it just had to rest for a while. The code from the last post was a big mess, its been through a complete rewrite now so its nicely restructured and I can move it forward and add more features without it breaking all the time. Using Stronghold as my test level, framerate is about half of the standard 1.7.1 forward renderer on my Radeon 3870.

No video this time since things like water and fire aren't ready yet. Here's a few screenshots of my current WIP.

www.futurenation.net/glbase/images/kork1.jpg
www.futurenation.net/glbase/images/kork2.jpg
www.futurenation.net/glbase/images/kork3.jpg

And completely off topic, if you're reading this in the States or Canada and you can still get tickets for the Manic Street Preachers US tour at the end of September you can get to see one of the best bands to come out of the UK in the last 20 years, promoting their greatest ever album, in intimate venues for $15 a pop, how can you ignore that.

#1
08/01/2009 (5:57 am)
Wow, looking great Adrian! Do all objects cast shadows, or is it just DTS-based ones?
#2
08/01/2009 (6:49 am)
Hi Taylor,

DTSs and DIFs. This sreenshot shows cottage.dif self shadowing and casting a shadow on the terrain.

www.futurenation.net/glbase/images/kork4.jpg
#3
08/01/2009 (7:57 am)
Those look pretty crisp, very nice! How's the performance hit?
#4
08/01/2009 (8:00 am)
Bryce: According to the blog:
Quote:Using Stronghold as my test level, framerate is about half of the standard 1.7.1 forward renderer on my Radeon 3870.


;)

The dif shadow looks great!
#5
08/01/2009 (8:47 am)
impressive....
#6
08/01/2009 (9:09 am)
@Bryce,

IMO the shadows are too crisp, this is because I haven't implemented any shadow filtering yet so the shadow map resolution is high to stop the shadows looking blocky. Shadow filtering should give nicer softer shadows and in theory allow the shadow map resolution to be turned down, which should also give some performance boost.

Performance hit is hard to quantify because in some areas of the Stronghold map where the TGEA forward renderer seems to struggle and the frame rate drops, my deferred renderer doesn't seem to struggle as much and the frame rate is quite a bit more than half of the forward renderer.
#7
08/01/2009 (2:56 pm)
The .dts shadows look extremely good, I can agree with the crisp part as well. (though there should be a option for the crispness level!?)

The .dif shadow looks a bit strange, like it was being clipped on the terrain for being too large? (ex. lower left-hand side of the cottage)

Either way, looks awesome keep up the good work!
#8
08/01/2009 (3:27 pm)
This is brilliant :). Are the code changes such that this rendering mode could be toggled on or off? I've got no real idea what deferred rendering and forward rendering entail ;P. But I'm going to guess my answer is no...
Kork and the crossbow don't seem to be self-shadowing - that's deliberate, I guess?
#9
08/01/2009 (4:29 pm)
@CSMP

Quote:The .dif shadow looks a bit strange, like it was being clipped on the terrain for being too large? (ex. lower left-hand side of the cottage)

I think thats just the direction of the sun versus the angle of the roof. There should definitely be a "shadow crispiness" setting!

@Daniel

There's a simple console command to toggle between deferred and forward render modes. Deferred mode requires shader model 3. In theory it can be made to work with SM2 but I'm not sure that a SM2 card will have the necessary grunt to make it worth trying.

Kork and the crossbow should self shadow, again I think its the angle of the sun in the screen shots. This sequence shows the crossbow being raised out of the shadow cast by Kork.

www.futurenation.net/glbase/images/kork5.jpg

And this shot shows Kork's left shoulder pad shadowing Kork's back. There's also a weird shadow artefact on the right shoulder pad, which I think is the helmet trying to cast a shadow but being limited by the depth precision of the shadow maps.

www.futurenation.net/glbase/images/kork6.jpg
#10
08/01/2009 (11:06 pm)
That sounds really good. I was just wondering whether your rendering mode could be used as a sort of graphical addon that could be toggled by users. SOunds like that's a go, then.
#11
08/12/2009 (3:21 pm)
wahey, at last some (translucent, reflecting, shadowing) water!

www.futurenation.net/glbase/images/kork7.jpg