mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-16 15:31:30 +00:00
73 lines
No EOL
1.1 KiB
C++
73 lines
No EOL
1.1 KiB
C++
#ifndef __GL_TONEMAPSHADER_H
|
|
#define __GL_TONEMAPSHADER_H
|
|
|
|
#include "gl_shaderprogram.h"
|
|
|
|
class FTonemapShader
|
|
{
|
|
public:
|
|
void Bind();
|
|
|
|
FBufferedUniformSampler SceneTexture;
|
|
FBufferedUniformSampler ExposureTexture;
|
|
FBufferedUniformSampler PaletteLUT;
|
|
|
|
static bool IsPaletteMode();
|
|
|
|
private:
|
|
enum TonemapMode
|
|
{
|
|
None,
|
|
Uncharted2,
|
|
HejlDawson,
|
|
Reinhard,
|
|
Linear,
|
|
Palette,
|
|
NumTonemapModes
|
|
};
|
|
|
|
static const char *GetDefines(int mode);
|
|
|
|
FShaderProgram mShader[NumTonemapModes];
|
|
};
|
|
|
|
class FExposureExtractShader
|
|
{
|
|
public:
|
|
void Bind();
|
|
|
|
FBufferedUniformSampler SceneTexture;
|
|
FBufferedUniform2f Scale;
|
|
FBufferedUniform2f Offset;
|
|
|
|
private:
|
|
FShaderProgram mShader;
|
|
};
|
|
|
|
class FExposureAverageShader
|
|
{
|
|
public:
|
|
void Bind();
|
|
|
|
FBufferedUniformSampler ExposureTexture;
|
|
|
|
private:
|
|
FShaderProgram mShader;
|
|
};
|
|
|
|
class FExposureCombineShader
|
|
{
|
|
public:
|
|
void Bind();
|
|
|
|
FBufferedUniformSampler ExposureTexture;
|
|
FBufferedUniform1f ExposureBase;
|
|
FBufferedUniform1f ExposureMin;
|
|
FBufferedUniform1f ExposureScale;
|
|
FBufferedUniform1f ExposureSpeed;
|
|
|
|
private:
|
|
FShaderProgram mShader;
|
|
};
|
|
|
|
#endif |