Special class that allows the application of multiple Post Effects, and enable/disable specific ones at runtime.
More...
#include <VPostEffect.h>
|
std::vector< VPostEffectBase * > | postEffects |
| List of post process effects.
|
|
std::vector< bool > | enabled |
| List to determine which post effects are enabled.
|
|
std::vector< std::unique_ptr< sf::RenderTexture > > | renderTextures |
| List of render textures to apply post effects to.
|
|
unsigned int | maxSize = 0 |
| The fixed size of post process effects.
|
|
|
static bool | isSupported () |
|
static void | applyShader (const sf::Shader &shader, sf::RenderTarget &output) |
|
static void | passThrough (const sf::Texture &input, sf::RenderTarget &output) |
|
Special class that allows the application of multiple Post Effects, and enable/disable specific ones at runtime.
◆ VPostEffectMultipass()
VPostEffectMultipass::VPostEffectMultipass |
( |
int |
MaxSize | ) |
|
- Parameters
-
MaxSize | The fixed amount of shaders the multipass can have. |
◆ AddPostEffect()
- Parameters
-
post | The Post Effect to add. |
◆ Apply()
virtual void VPostEffectMultipass::Apply |
( |
const sf::Texture & |
input, |
|
|
sf::RenderTarget & |
output |
|
) |
| |
|
virtual |
Apply post effect from an input RenderTexture to an output RenderTarget (which may be a RenderTexture or Window).
- Parameters
-
input | The texture to pass through. |
output | The render target (Whether it's a RenderTexture or RenderWindow) to apply the shader to. |
Implements VPostEffectBase.
◆ EnableEffect()
void VPostEffectMultipass::EnableEffect |
( |
unsigned int |
index, |
|
|
bool |
enable |
|
) |
| |
Enable/disable effect at index.
- Parameters
-
index | The index of the post effect list to remove. |
enable | Enables the post effect if true, else disable it. |
◆ GetPostEffect()
- Parameters
-
index | The index of the post effect list to remove. |
- Returns
- If index is valid, then returns the post effect.
◆ RemovePostEffect()
void VPostEffectMultipass::RemovePostEffect |
( |
unsigned int |
index | ) |
|
- Parameters
-
index | The index of the post effect list to remove. |
◆ Update()
virtual void VPostEffectMultipass::Update |
( |
float |
dt | ) |
|
|
virtual |
Updates all post effects currently enabled.
- Parameters
-
dt | Delta Time between the previous and current frame. |
Reimplemented from VPostEffectBase.
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/VPostEffect.h