Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/Samples/DeferredShading/include/LightMaterialGenerator.h @ 3

Last change on this file since 3 was 3, checked in by anonymous, 17 years ago

=update

File size: 2.5 KB
Line 
1/**
2Implementation of Deferred Shading in OGRE using Multiple Render Targets and
3HLSL/GLSL high level language shaders.
4        // W.J. :wumpus: van der Laan 2005 //
5
6Deferred shading renders the scene to a 'fat' texture format, using a shader that outputs colour,
7normal, depth, and possible other attributes per fragment. Multi Render Target is required as we
8are dealing with many outputs which get written into multiple render textures in the same pass.
9
10After rendering the scene in this format, the shading (lighting) can be done as a post process.
11This means that lighting is done in screen space. Adding them requires nothing more than rendering
12a screenful quad; thus the method allows for an enormous amount of lights without noticable
13performance loss.
14
15Little lights affecting small area ("Minilights") can be even further optimised by rendering
16their convex bounding geometry. This is also shown in this demo by 6 swarming lights.
17
18The paper for GDC2004 on Deferred Shading can be found here:
19  http://www.talula.demon.co.uk/DeferredShading.pdf
20
21This uses a heavily hacked version of the Ogre PostProcessing framework by Manuel.
22*******************************************************************************
23Copyright (c) W.J. van der Laan
24
25Permission is hereby granted, free of charge, to any person obtaining a copy of
26this software  and associated documentation files (the "Software"), to deal in
27the Software without restriction, including without limitation the rights to use,
28copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
29Software, and to permit persons to whom the Software is furnished to do so, subject
30to the following conditions:
31
32The above copyright notice and this permission notice shall be included in all copies
33or substantial portions of the Software.
34
35THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
36INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
37PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
40SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41*******************************************************************************
42*/
43#ifndef H_WJ_LightMaterialGenerator
44#define H_WJ_LightMaterialGenerator
45
46#include "MaterialGenerator.h"
47
48class LightMaterialGenerator: public MaterialGenerator
49{
50public:
51        LightMaterialGenerator(const Ogre::String &language);
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.