GlistEngine
Loading...
Searching...
No Matches
gFXAA Class Reference

#include <gFXAA.h>

Inheritance diagram for gFXAA:
Collaboration diagram for gFXAA:

Public Member Functions

 gFXAA (float subpixelblend=0.75f, float edgethresholdmin=0.0312f, float edgethresholdmax=0.125f)
virtual ~gFXAA ()
void use () override
void setSubpixelBlend (float value)
void setEdgeThresholdMin (float value)
void setEdgeThresholdMax (float value)
Public Member Functions inherited from gBasePostProcess
 gBasePostProcess ()
virtual ~gBasePostProcess ()
gShader * getShader ()
Public Member Functions inherited from gRenderObject
 gRenderObject ()
int getScreenWidth ()
int getScreenHeight ()
void pushMatrix ()
void popMatrix ()
Public Member Functions inherited from gObject
 gObject ()
void logi (std::string message)
void logd (std::string message)
void logw (std::string message)
void loge (std::string message)
void logi (std::string tag, std::string message)
void logd (std::string tag, std::string message)
void logw (std::string tag, std::string message)
void loge (std::string tag, std::string message)

Protected Member Functions

const std::string getVertSrc () override
const std::string getFragSrc () override
void render (gFbo &src, gFbo &dst) override

Additional Inherited Members

Static Public Member Functions inherited from gRenderObject
static void setScreenSize (int screenWidth, int screenHeight)
static void setUnitScreenSize (int unitWidth, int unitHeight)
static void setScreenScaling (int screenScaling)
static void enableShadowMapping ()
static void disableShadowMapping ()
static bool isShadowMappingEnabled ()
static void enableExtraShaders (bool isEnabled=true)
static void disableExtraShaders ()
static bool isExtraShadersEnabled ()
static gRenderer * getRenderer ()
static void destroyRenderer ()
static void createRenderer (int renderEngine=G_RENDERER_GL)
Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
static std::string gGetAssetsDir ()
static void gSetAssetsDir (std::string assetsDir)
static std::string gGetFilesDir ()
static std::string gGetImagesDir ()
static std::string gGetFontsDir ()
static std::string gGetModelsDir ()
static std::string gGetTexturesDir ()
static std::string gGetShadersDir ()
static std::string gGetSoundsDir ()
static std::string gGetDatabasesDir ()
static std::string gGetVideosDir ()
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
static const int LOGLEVEL_DEBUG
static const int LOGLEVEL_INFO
static const int LOGLEVEL_WARNING
static const int LOGLEVEL_ERROR
Protected Attributes inherited from gBasePostProcess
gShader * shader
Static Protected Attributes inherited from gRenderObject
static bool isshadowmappingenabled
static bool isextrashadersenabled
Static Protected Attributes inherited from gObject
static int renderpassnum
static int renderpassno
static int releasescaling
static int releaseresolution

Constructor & Destructor Documentation

◆ gFXAA()

gFXAA::gFXAA ( float subpixelblend = 0.75f,
float edgethresholdmin = 0.0312f,
float edgethresholdmax = 0.125f )
Note
Pipeline Order Recommendation: For optimal results, FXAA should always be the first effect added to the gPostProcessManager. FXAA relies on the raw, unaltered luminance contrast of the scene to accurately detect jagged edges. If placed after effects that blur or scatter light (such as Bloom, Depth of Field, or Motion Blur), the original geometry edges will be lost, rendering the anti-aliasing ineffective. Always apply FXAA on the pristine frame before adding any lens or atmospheric effects!
Parameters
subpixelblendAmount of sub-pixel aliasing removal (0.0 - 1.0). Higher values = softer image, more blur.
edgethresholdminMinimum local contrast to be considered an edge (removes shader work in flat areas).
edgethresholdmaxMaximum contrast threshold trades speed for quality.

Example Quality Presets:

  • Extreme Quality: (1.0f, 0.02f, 0.0312f)
  • High Quality: (0.75f, 0.0312f, 0.0625f)
  • Fast/Low Quality: (0.25f, 0.0833f, 0.25f)

◆ ~gFXAA()

virtual gFXAA::~gFXAA ( )
virtual

Member Function Documentation

◆ getFragSrc()

const std::string gFXAA::getFragSrc ( )
overrideprotectedvirtual

Implements gBasePostProcess.

◆ getVertSrc()

const std::string gFXAA::getVertSrc ( )
overrideprotectedvirtual

Implements gBasePostProcess.

◆ render()

void gFXAA::render ( gFbo & src,
gFbo & dst )
overrideprotectedvirtual

Reimplemented from gBasePostProcess.

◆ setEdgeThresholdMax()

void gFXAA::setEdgeThresholdMax ( float value)

◆ setEdgeThresholdMin()

void gFXAA::setEdgeThresholdMin ( float value)

◆ setSubpixelBlend()

void gFXAA::setSubpixelBlend ( float value)

◆ use()

void gFXAA::use ( )
overridevirtual

Implements gBasePostProcess.


The documentation for this class was generated from the following file: