TDME2
1.9.200
src
tdme
engine
subsystems
postprocessing
PostProcessingShaderSSAOMapImplementation.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
#include <string>
5
6
#include <
tdme/tdme.h
>
7
#include <
tdme/engine/fwd-tdme.h
>
8
#include <
tdme/engine/subsystems/postprocessing/fwd-tdme.h
>
9
#include <
tdme/engine/subsystems/postprocessing/PostProcessingShaderBaseImplementation.h
>
10
#include <
tdme/engine/subsystems/renderer/fwd-tdme.h
>
11
12
using
std::array;
13
using
std::string;
14
15
using
tdme::engine::subsystems::renderer::Renderer
;
16
using
tdme::engine::Engine
;
17
using
tdme::engine::Texture
;
18
19
/**
20
* Post processing shader SSAO map generation implementation
21
* @author Andreas Drewke
22
*/
23
class
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation
:
public
PostProcessingShaderBaseImplementation
24
{
25
public
:
26
/**
27
* Returns if shader is supported on given renderer
28
* @param renderer renderer
29
* @return if shader is supported
30
*/
31
static
bool
isSupported
(
Renderer
*
renderer
);
32
33
// forbid class copy
34
FORBID_CLASS_COPY
(
PostProcessingShaderSSAOMapImplementation
)
35
36
/**
37
* Public constructor
38
* @param renderer renderer
39
*/
40
PostProcessingShaderSSAOMapImplementation
(
Renderer
*
renderer
);
41
42
// overridden methods
43
virtual
void
initialize
()
override
;
44
virtual
void
useProgram
(
int
contextIdx)
override
;
45
virtual
void
setShaderParameters
(
int
contextIdx,
Engine
* engine)
override
;
46
virtual
void
unloadTextures
()
override
;
47
virtual
void
loadTextures
(
const
string
& pathName)
override
;
48
49
private
:
50
array<int32_t, 16>
uniformSphere
;
51
int32_t
uniformRandomTextureUnit
{ -1 };
52
int32_t
uniformStrength
{ -1 };
53
int32_t
uniformArea
{ -1 };
54
int32_t
uniformFallOff
{ -1 };
55
int32_t
uniformRadius
{ -1 };
56
int32_t
uniformSamples
{ -1 };
57
Texture
*
randomTexture
{
nullptr
};
58
int32_t
randomTextureId
{ -1 };
59
};
PostProcessingShaderBaseImplementation.h
tdme::engine::Engine
Engine main class.
Definition:
Engine.h:131
tdme::engine::Texture
Texture entity.
Definition:
Texture.h:24
tdme::engine::subsystems::postprocessing::PostProcessingShaderBaseImplementation
Post processing shader base implementation.
Definition:
PostProcessingShaderBaseImplementation.h:22
tdme::engine::subsystems::postprocessing::PostProcessingShaderBaseImplementation::renderer
Renderer * renderer
Definition:
PostProcessingShaderBaseImplementation.h:38
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation
Post processing shader SSAO map generation implementation.
Definition:
PostProcessingShaderSSAOMapImplementation.h:24
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::loadTextures
virtual void loadTextures(const string &pathName) override
Load textures.
Definition:
PostProcessingShaderSSAOMapImplementation.cpp:128
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::randomTextureId
int32_t randomTextureId
Definition:
PostProcessingShaderSSAOMapImplementation.h:58
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::uniformArea
int32_t uniformArea
Definition:
PostProcessingShaderSSAOMapImplementation.h:53
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::uniformStrength
int32_t uniformStrength
Definition:
PostProcessingShaderSSAOMapImplementation.h:52
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::setShaderParameters
virtual void setShaderParameters(int contextIdx, Engine *engine) override
Set shader parameters.
Definition:
PostProcessingShaderSSAOMapImplementation.cpp:113
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::initialize
virtual void initialize() override
Initialize post processing shader.
Definition:
PostProcessingShaderSSAOMapImplementation.cpp:34
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::isSupported
static bool isSupported(Renderer *renderer)
Returns if shader is supported on given renderer.
Definition:
PostProcessingShaderSSAOMapImplementation.cpp:26
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::PostProcessingShaderSSAOMapImplementation
PostProcessingShaderSSAOMapImplementation(Renderer *renderer)
Public constructor.
Definition:
PostProcessingShaderSSAOMapImplementation.cpp:30
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::uniformRadius
int32_t uniformRadius
Definition:
PostProcessingShaderSSAOMapImplementation.h:55
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::uniformFallOff
int32_t uniformFallOff
Definition:
PostProcessingShaderSSAOMapImplementation.h:54
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::unloadTextures
virtual void unloadTextures() override
Unload textures.
Definition:
PostProcessingShaderSSAOMapImplementation.cpp:121
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::uniformRandomTextureUnit
int32_t uniformRandomTextureUnit
Definition:
PostProcessingShaderSSAOMapImplementation.h:51
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::useProgram
virtual void useProgram(int contextIdx) override
Use program.
Definition:
PostProcessingShaderSSAOMapImplementation.cpp:90
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::randomTexture
Texture * randomTexture
Definition:
PostProcessingShaderSSAOMapImplementation.h:57
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::uniformSamples
int32_t uniformSamples
Definition:
PostProcessingShaderSSAOMapImplementation.h:56
tdme::engine::subsystems::postprocessing::PostProcessingShaderSSAOMapImplementation::uniformSphere
array< int32_t, 16 > uniformSphere
Definition:
PostProcessingShaderSSAOMapImplementation.h:50
tdme::engine::subsystems::renderer::Renderer
Renderer interface.
Definition:
Renderer.h:46
fwd-tdme.h
fwd-tdme.h
fwd-tdme.h
tdme.h
FORBID_CLASS_COPY
#define FORBID_CLASS_COPY(CLASS)
Definition:
tdme.h:6
Generated by
1.9.1