Minimal deferred shading demo/tutorial

What it says on the tin: a place to discuss proposed new features.
Post Reply
Posts: 74
Joined: Sun Sep 07, 2008 5:09 pm

Minimal deferred shading demo/tutorial

Post by yeahRIGHT »

Hi there,

I just wanted to point out that so far, I have been unable to learn how to implement deferred shading properly using OGRE. I have a working solution for the lighting itself, but I can't get the shadows working (see

While this clearly is somehow my fault, I have to say that the material provided (the demo and this article: isn't very helpful for understanding the key concepts of OGRE that are needed here. The demo/article represents a huge framework for on-the-fly material and shader code generation and even includes screen space ambient occlusion, while the important OGRE constructs are only partially explained.

Instead of teaching your users how to employ certain techniques, you present this giant application that can handle any thinkable use case (all light/shadow yes/no combinations) and is extensible for people that already understand all of that. I understand that the demo is also some kind of showcase for OGRE, but the Wiki definitely lacks newbie information about this topic.

I would be much more interrested in a minimal example that uses a simple material script file and compositor that can do nothing else but drawing one specific light type (maybe one for each of the 3 light types) with shadows. Users could then learn from this and implement additional ambient light and whatever they need. Especially with deferred shading, it's not hard to add something.

I do not even consider myself a complete newbie, but anyway, a majority of your user base will always be newbies. Please consider this when designing demos and articles. Thanks for listening to my whining. :mrgreen:

User avatar
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 714
Joined: Mon Jan 31, 2005 7:21 pm
Location: Israel
x 2

Re: Minimal deferred shading demo/tutorial

Post by Noman »


I understand your request, but it would be hard to write a single demo/article to suit everyone's needs. The deferred shading demo is one of the more complicated demos in the framework, and is not a walk in the park, even though some decisions were made strictly to keep it simpler.

One of the things I wanted to show in this demo was that it was possible to create a deferred shading system that
- Does not require the entire application to be aware of the fact that it uses deferred shading
- Does not require a huge amount of materials/shaders manually written
- Can be adapted to real use scenarios without breaking either of these two goals.

Yes, its possible to create a demo that renders a single object to the GBuffer and then renders a single light from it. But that is not the point of this demo. The point is to show how some of the hooks added to ogre can be used to elegantly create a g-buffer solution.

The article and demo both require knowledge of both deferred shading and ogre. They focus on putting them together.

Posts: 38
Joined: Wed Jun 17, 2015 10:43 am

Re: Minimal deferred shading demo/tutorial

Post by dgraisins »

I agree. What you have in your Wiki tutorial articles are kind of useless.

Posts: 24
Joined: Sat Jul 05, 2014 3:21 am
x 1

Re: Minimal deferred shading demo/tutorial

Post by scottyp »

I agree. What you have in your Wiki tutorial articles are kind of useless.
I would agree with OP here and the guy above me. The docs seems kinda outdated and examples look like 2005. How about some up-to-date demos?

I still see Ogre3D as a powerful rendering engine with a lot of userbase, success stories and flexibility but it looks like there are no "give back" support that beginners can benefit from. Not to mention the devs does not have the time for it due to some busy schedule or some other projects like a sad attempt to imitate Unity's built-in editor. (I would prefer artifex terra btw, it's more stable and have actually built a sample demo with it)

I'm still waiting for a good PSSM demo with grass/alpha involved with it. Apparently I can only see it available through a demo that the Ogre founder is selling. or some Ogre genius that only provides video as portfolios. Whereas with other engines, this is already a built-in feature. just wow.

btw, I posted this problem on gamedev/stackexchange and it got some upvotes.. ... ng-shadows

My one year old post (happy birthday), still unanswered:

No wonder there's no love with GSOC. (smh)

Sorry to chime in on this OP, but it really needs some attention and good to see a retired ogre dev still answering here.

Good Day.

Posts: 253
Joined: Sat Sep 28, 2013 3:46 pm
x 10

Re: Minimal deferred shading demo/tutorial

Post by white_waluigi »

Don't know if it helps you, but a few monthas ago I made an improved version of Deferred Shading with better shadows and other features:

I have since decidced to abandon it in favour of an HLMS based Deferred shading solution.
If you have questions feel free to pm me.

Post Reply