Post Processing FX are applied to the final output of the scene, GG.fx()
Abstract base class for all post-processing effects.
FX()
Default constructor for FX.
int bypass(int flag)
Set the bypass flag. If true then this effect will be skipped in the effects chainand the next effect will be used instead.
int bypass()
Get the bypass flag.
FX next(FX next)
Set the next effect in the chain.
FX next()
Get the next effect in the chain.
FX removeNext()
Remove the next effect in the chain. Returns the removed effect.
[ top ]
A pass-through effect. This effect does nothing and simply passes the input texture to the output framebuffer.Intended for internal use and testing.
PassThroughFX()
Default constructor for PassThroughFX.
[ top ]
The output effect, which applies gamma correction and tonemapping.If used, this effect should always be the last effect in the chain.
OutputFX()
Default constructor for OutputFX.
float exposure(float exposure)
Set the exposure value. Multiplies the HDR color values before tonemapping.
float exposure()
Get the exposure value.
float gamma(float gamma)
Set value for gamma correction.Before writing to screen, all pixel colors are raised to the power of 1/gamma.
float gamma()
Get value for gamma correction.
int toneMap(int method)
Set the tonemapping method.0 = none, 1 = Reinhard.
int toneMap()
Get the tonemapping method.
int TONEMAP_ACES
Tone mapping approach developed by the Academy Color Encoding System (ACES).Gilves filmic quality.
int TONEMAP_CINEON
Cineon tonemapping. Source: http://filmicworlds.com/blog/filmic-tonemapping-operators/.
int TONEMAP_LINEAR
Linear tonemapping. HDR color values will be clamped to [0, 1] after being scaled by exposure.
int TONEMAP_NONE
No tonemapping. HDR color values will be clamped to [0, 1].
int TONEMAP_REINHARD
Reinhard tonemapping. HDR color values will be mapped with the formula (HDR / (HDR + 1)) * exposure.
int TONEMAP_UNCHARTED
Tone mapping used by Uncharted 2.Source: http://filmicworlds.com/blog/filmic-tonemapping-operators/.
[ top ]
An effect that inverts the colors of the input texture. inverseColor = 1.0 - inputColorPlace this AFTER the Output pass, when Tonemapping has already been applied and colors have been mapped into the range [0, 1].
InvertFX()
Default constructor for InvertFX.
float mix()
Get the mix factor for the invert effect.
float mix(float mix)
Set the mix factor for the invert effect.0 = no invert, 1 = full invert. Interpolates between input texture and inverted texture.
[ top ]
An effect that converts colors of the input texture to grayscale, and then multiplies by a color.Can be placed before or after the Output pass.
MonochromeFX()
Default constructor for MonochromeFX.
vec3 color()
Get the color for the monochrome effect.
vec3 color(vec3 color)
Set the color for the effect.The color will be multiplied by the grayscale value of the input texture.
float mix()
Get the mix factor for the monochrome effect.
float mix(float mix)
Set the mix factor for the effect.0 = no monochrome, 1 = full monochrome. Interpolates between input texture and monochrome texture.
[ top ]
Physically-based Bloom effect. Combines input texture with a blurred version of itself to create a glow effect.Recommended to use with Output effect, for gamma correction and tone mapping.
BloomFX()
Default constructor for BloomFX.
int blend(int blendMode)
Set the blend mode for the bloom effect.Use one of the static constants: ADD or MIX.
int blend()
Get the blend mode for the bloom effect.
int karisAverage(int karisEnabled)
Enable or disable Karis averagingReduces flickering artifacts (aka fireflies) caused by overly bright subpixels.
int karisAverage()
Get the Karis averaging flag.
int levels(int numLevels)
Number of blur passes to apply to the bloom texture.Clamped between 1 and 16.
int levels()
Get the number of blur passes applied to the bloom texture.
float radius()
Get the bloom filter radius.
float radius(float radius)
Radius of filter kernel during bloom blur pass.
float strength()
Get the bloom strength.
float strength(float strength)
Set the bloom strength.If the bloom blending mode is additive, this is the multiplier for the bloom texture.If the bloom blending mode is mix, this is the interpolation factor between the input texture and the bloom texture.
float threshold()
Get the bloom threshold.
float threshold(float threshold)
Threshold for bloom effect. Pixels with brightness below this value will not be bloomed.
int BLEND_ADD
Additive blending mode. Bloom texture is multiplied by strength and added to input texture.
int BLEND_MIX
Mix blending mode. Bloom texture is interpolated with input texture by strength.
[ top ]
Create a custom Post-Processing effect by supplying your own screen shader.
CustomFX()
Default constructor for CustomFX.
int getBool(string name)
No description available
vec2 getFloat2(string name)
No description available
vec3 getFloat3(string name)
No description available
vec4 getFloat4(string name)
No description available
float getFloat(string name)
No description available
vec2 getInt2(string name)
No description available
vec3 getInt3(string name)
No description available
vec4 getInt4(string name)
No description available
int getInt(string name)
No description available
Texture getTexture(string name)
No description available
void setBool(string name, int value)
No description available
void setFloat2(string name, vec2 float2)
No description available
void setFloat3(string name, vec3 float3)
No description available
void setFloat4(string name, vec4 float4)
No description available
void setFloat(string name, float value)
No description available
void setInt2(string name, vec2 int2)
No description available
void setInt3(string name, vec3 int3)
No description available
void setInt4(string name, vec4 int4)
No description available
void setInt(string name, int value)
No description available
void setTexture(string name, Texture texID)
No description available
string shader()
Get the screen shader string, passed in via either shaderPath() or shaderString()
string shaderPath(string shaderPath)
Set the path to the screen shader file.The screen shader is a glsl fragment shader that will be applied to the input of the previous effect.
string shaderString(string shaderString)
Set the screen shader string.
[ top ]