A basic Post Processing effect that uses a single shader object and allows setting different kinds of Uniform parameters.
More...
#include <VPostEffect.h>
|
| VPostEffect (const sf::String &filename, sf::Shader::Type type) |
|
| VPostEffect (const sf::String &vertFile, const sf::String &fragFile) |
|
| VPostEffect (const sf::String &vertFile, const sf::String &geomFile, const sf::String &fragFile) |
|
void | SetInputTextureName (const sf::String &name) |
|
void | SetParameter (const sf::String ¶mName, sf::Shader::CurrentTextureType currentTextureType) |
|
void | SetParameter (const sf::String ¶mName, const sf::Texture &texture) |
|
void | SetParameter (const sf::String ¶mName, const sf::Transform &transform) |
|
void | SetParameter (const sf::String ¶mName, const sf::Color &colour) |
|
void | SetParameter (const sf::String ¶mName, const sf::Vector3f &vec3) |
|
void | SetParameter (const sf::String ¶mName, const sf::Vector2f &vec2) |
|
void | SetParameter (const sf::String ¶mName, float x, float y, float z, float w) |
|
void | SetParameter (const sf::String ¶mName, float x, float y, float z) |
|
void | SetParameter (const sf::String ¶mName, float x, float y) |
|
void | SetParameter (const sf::String ¶mName, float x) |
|
virtual void | Apply (const sf::Texture &input, sf::RenderTarget &output) |
|
virtual void | Update (float dt) |
|
|
static bool | isSupported () |
|
static void | applyShader (const sf::Shader &shader, sf::RenderTarget &output) |
|
static void | passThrough (const sf::Texture &input, sf::RenderTarget &output) |
|
A basic Post Processing effect that uses a single shader object and allows setting different kinds of Uniform parameters.
◆ VPostEffect() [1/3]
VPostEffect::VPostEffect |
( |
const sf::String & |
filename, |
|
|
sf::Shader::Type |
type |
|
) |
| |
- Parameters
-
filename | File path and name of shader file. |
type | The Type of shader. |
◆ VPostEffect() [2/3]
VPostEffect::VPostEffect |
( |
const sf::String & |
vertFile, |
|
|
const sf::String & |
fragFile |
|
) |
| |
- Parameters
-
vertFile | File path and name of the vertex shader file. |
fragFile | File path and name of the fragment shader file. |
◆ VPostEffect() [3/3]
VPostEffect::VPostEffect |
( |
const sf::String & |
vertFile, |
|
|
const sf::String & |
geomFile, |
|
|
const sf::String & |
fragFile |
|
) |
| |
- Parameters
-
vertFile | File path and name of the vertex shader file. |
geomFile | File path and name of the geometry shader file. |
fragFile | File path and name of the fragment shader file. |
◆ Apply()
virtual void VPostEffect::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.
◆ SetInputTextureName()
void VPostEffect::SetInputTextureName |
( |
const sf::String & |
name | ) |
|
- Parameters
-
name | The name for the Input Texture (the default texture assuming no texture is set to the Uniform variable). |
◆ SetParameter() [1/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
sf::Shader::CurrentTextureType |
currentTextureType |
|
) |
| |
Sets Texture Type Parameter.
- Parameters
-
paramName | The name of the uniform parameter. |
currentTextureType | Special type that represents the texture of the object being drawn. |
◆ SetParameter() [2/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
const sf::Texture & |
texture |
|
) |
| |
Sets Texture Parameter.
- Parameters
-
paramName | The name of the uniform parameter. |
texture | The texture to use for texture. |
◆ SetParameter() [3/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
const sf::Transform & |
transform |
|
) |
| |
Sets Transform Parameter.
- Parameters
-
paramName | The name of the uniform parameter. |
transform | The transform matrix to set. |
◆ SetParameter() [4/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
const sf::Color & |
colour |
|
) |
| |
Sets Colour (Vec4) Parameter
- Parameters
-
paramName | The name of the uniform parameter. |
colour | The colour that will be converted to Vec4. |
◆ SetParameter() [5/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
const sf::Vector3f & |
vec3 |
|
) |
| |
Sets Vec3 Parameter
- Parameters
-
paramName | The name of the uniform parameter. |
vec3 | The Vector3f that will be converted to Vec3. |
◆ SetParameter() [6/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
const sf::Vector2f & |
vec2 |
|
) |
| |
Sets Vec2 Parameter
- Parameters
-
paramName | The name of the uniform parameter. |
vec2 | The Vector3f that will be converted to Vec2. |
◆ SetParameter() [7/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
w |
|
) |
| |
Sets Vec4 Parameter from individual floats.
- Parameters
-
paramName | The name of the uniform parameter. |
x | X coordinate. |
y | Y coordinate. |
z | Z coordinate. |
w | W coordinate. |
◆ SetParameter() [8/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Sets Vec3 Parameter from individual floats.
- Parameters
-
paramName | The name of the uniform parameter. |
x | X coordinate. |
y | Y coordinate. |
z | Z coordinate. |
◆ SetParameter() [9/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
float |
x, |
|
|
float |
y |
|
) |
| |
Sets Vec2 Parameter from individual floats.
- Parameters
-
paramName | The name of the uniform parameter. |
x | X coordinate. |
y | Y coordinate. |
◆ SetParameter() [10/10]
void VPostEffect::SetParameter |
( |
const sf::String & |
paramName, |
|
|
float |
x |
|
) |
| |
Sets float parameter.
- Parameters
-
paramName | The name of the uniform parameter. |
x | Float value. |
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/VPostEffect.h