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

Creates a Chromatic Abberation effect. More...

#include <ChromeAb.hpp>

Inheritance diagram for xy::PostChromeAb:
xy::PostProcess

Public Member Functions

 PostChromeAb (bool distort=false)
 Constructor. More...
 
void apply (const sf::RenderTexture &, sf::RenderTarget &) override
 
void update (float) override
 
- 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

Creates a Chromatic Abberation effect.

Chromatic abberation is the apparent split in colours often noticed near the edges of powerful lenses. The effect also adds noise and scanlines to try and recreate the overall effect of and old CRT type monitor

Constructor & Destructor Documentation

◆ PostChromeAb()

xy::PostChromeAb::PostChromeAb ( bool  distort = false)

Constructor.

Parameters
distortIf set to true the post effect will apply a CRT style bowed distortion around the edge of the screen

Member Function Documentation

◆ apply()

void xy::PostChromeAb::apply ( const sf::RenderTexture &  ,
sf::RenderTarget &   
)
overridevirtual
See also
PostProcess

Implements xy::PostProcess.

◆ update()

void xy::PostChromeAb::update ( float  )
overridevirtual
See also
PostProcess

Reimplemented from xy::PostProcess.