GlistEngine
Loading...
Searching...
No Matches
gFXAA.h
Go to the documentation of this file.
1/*
2 * gFXAA.cpp
3 *
4 * Created on: 6 Agu 2026
5 * Author: Numan Affan Kahya
6 *
7 * Post-process class implementing FXAA (Fast Approximate Anti-Aliasing).
8 * Follows the same single-pass gBasePostProcess pattern as gVignette.
9 */
10
11#ifndef GRAPHICS_POSTEFFECTS_GFXAA_H_
12#define GRAPHICS_POSTEFFECTS_GFXAA_H_
13
14#include "gBasePostProcess.h"
15
16class gFXAA: public gBasePostProcess {
17public:
18
41
42 gFXAA(float subpixelblend = 0.75f, float edgethresholdmin = 0.0312f, float edgethresholdmax = 0.125f);
43 virtual ~gFXAA();
44
45 void use() override;
46
47 void setSubpixelBlend(float value);
48 void setEdgeThresholdMin(float value);
49 void setEdgeThresholdMax(float value);
50
51protected:
52 const std::string getVertSrc() override;
53 const std::string getFragSrc() override;
54 void render(gFbo& src, gFbo& dst) override;
55
56private:
57 float subpixelblend;
58 float edgethresholdmin;
59 float edgethresholdmax;
60 unsigned int linearsampler;
61};
62
63#endif /* GRAPHICS_POSTEFFECTS_GFXAA_H_ */
void render(gFbo &src, gFbo &dst) override
const std::string getFragSrc() override
void setSubpixelBlend(float value)
const std::string getVertSrc() override
void setEdgeThresholdMax(float value)
void setEdgeThresholdMin(float value)
virtual ~gFXAA()
void use() override
gFXAA(float subpixelblend=0.75f, float edgethresholdmin=0.0312f, float edgethresholdmax=0.125f)
Definition gFbo.h:15