SuperTuxKart
Loading...
Searching...
No Matches
lighting_passes.hpp
1// SuperTuxKart - a fun racing game with go-kart
2// Copyright (C) 2015 SuperTuxKart-Team
3//
4// This program is free software; you can redistribute it and/or
5// modify it under the terms of the GNU General Public License
6// as published by the Free Software Foundation; either version 3
7// of the License, or (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18#ifndef HEADER_LIGHTING_PASSES_HPP
19#define HEADER_LIGHTING_PASSES_HPP
20
21#include "graphics/gl_headers.hpp"
22#include <vector3d.h>
23
24namespace irr
25{
26 namespace scene
27 {
28 class ICameraSceneNode;
29 }
30 namespace video
31 {
32 class SColorf;
33 }
34}
35
36class FrameBuffer;
37class PostProcessing;
38class ShadowMatrices;
39
40using namespace irr;
41
43{
44private:
45 unsigned m_point_light_count;
46
47 void renderEnvMap(GLuint normal_depth_texture,
48 GLuint depth_stencil_texture,
49 GLuint specular_probe,
50 GLuint albedo_buffer);
51
53 void renderSunlight(const core::vector3df &direction,
54 const video::SColorf &col,
55 GLuint normal_depth_texture,
56 GLuint depth_stencil_texture);
57
58public:
59 LightingPasses(): m_point_light_count(0){}
60
61 void updateLightsInfo(irr::scene::ICameraSceneNode * const camnode,
62 float dt);
63 void renderLights( bool has_shadow,
64 GLuint normal_depth_texture,
65 GLuint depth_stencil_texture,
66 GLuint albedo_texture,
67 const FrameBuffer* shadow_framebuffer,
68 GLuint specular_probe);
69 void renderLightsScatter(GLuint depth_stencil_texture,
70 const FrameBuffer& half1_framebuffer,
71 const FrameBuffer& half2_framebuffer,
72 const PostProcessing* post_processing);
73};
74
75#endif //HEADER_LIGHTING_PASSES_HPP
Definition: frame_buffer.hpp:33
Definition: lighting_passes.hpp:43
void renderSunlight(const core::vector3df &direction, const video::SColorf &col, GLuint normal_depth_texture, GLuint depth_stencil_texture)
Generate diffuse and specular map.
Definition: lighting_passes.cpp:338
Handles post processing, eg motion blur.
Definition: post_processing.hpp:42
Definition: shadow_matrices.hpp:40