xyginext  0.2.0
Second generation of xygine game creation framework
Public Member Functions | List of all members
xy::PostAntique Class Referencefinal

Antique Post process effect. Creates an old 'filmic' look, with dust, jitter and desaturation. More...

#include <Antique.hpp>

Inheritance diagram for xy::PostAntique:
xy::PostProcess

Public Member Functions

void apply (const sf::RenderTexture &, sf::RenderTarget &) override
 Applies the effect. More...
 
void update (float) override
 Updates the effect. Some effects may require shader parameters to be updated over time. This optionally overridable function passes in the current frame time and allows updating those parameters. This is called automatically when the effect is added to a Scene, but will need to be called manually when using the effect on its own.
 
template<typename T >
void setUniform (const std::string &name, T value)
 Allows updating shader parameters. Available paramters are: u_tone sf::Glsl::vec3 representing normalise RGB values to tint the image u_toneMix float 0 - 1 mix between untinted and tone colour u_vignetteRadius float 0 - 1 range affecting the radius of the non-vignetted area u_vignetteSoftness float 0 - 1 range feathering the edge of the vignette u_vignetteAmount float 0 -1 range affecting the vignette mix. 0 is no vignette, 1 is hard black u_flickerAmount float 0 - 1 affects the frequency of flicker, 0 is no flicker u_jitterAmount float 0 - 1 affects the offset of jitter, 0 is no jitter u_noiseAmount float 0 - 1 increases the amount of visible noise.
 
- Public Member Functions inherited from xy::PostProcess
 PostProcess (const PostProcess &)=delete
 
 PostProcess (PostProcess &&)=delete
 
PostProcessoperator= (const PostProcess &)=delete
 
PostProcessoperator= (PostProcess &&)=delete
 
void resizeBuffer (sf::Int32 w, sf::Int32 h)
 

Additional Inherited Members

- Public Types inherited from xy::PostProcess
using Ptr = std::unique_ptr< PostProcess >
 
- Protected Member Functions inherited from xy::PostProcess
virtual void bufferResized ()
 Called when the main output buffer resized. Implement this in post processes which contain intermediate buffers which need to be updated.
 
sf::Vector2i getBufferSize () const
 Returns the current buffer size.
 
- Static Protected Member Functions inherited from xy::PostProcess
static void applyShader (const sf::Shader &, sf::RenderTarget &)
 

Detailed Description

Antique Post process effect. Creates an old 'filmic' look, with dust, jitter and desaturation.

Member Function Documentation

◆ apply()

void xy::PostAntique::apply ( const sf::RenderTexture &  ,
sf::RenderTarget &   
)
overridevirtual

Applies the effect.

Parameters
RenderTextureA render Texture containing the scene to which the effect should be applied.
RenderTargetThe target to which the effected scene is rendered. This may be the current render window, or another RenderTexture when chaining multiple effects together.

The source and destinations are handled automatically by xygine when a post process effect is added to a scene, but must be specified maunally when using the effect outside the scene rendering.

Implements xy::PostProcess.