Merge branch 'master' of https://github.com/supertuxkart/stk-code
This commit is contained in:
commit
084fa04012
@ -1,4 +1,5 @@
|
|||||||
uniform sampler2D tex;
|
uniform sampler2D tex;
|
||||||
|
uniform float scale;
|
||||||
|
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
@ -7,7 +8,7 @@ out vec4 FragColor;
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec2 uv = gl_FragCoord.xy / 512.;
|
vec2 uv = gl_FragCoord.xy / (512. * scale);
|
||||||
vec3 col = texture(tex, uv).xyz;
|
vec3 col = texture(tex, uv).xyz;
|
||||||
vec3 Yxy = getCIEYxy(col);
|
vec3 Yxy = getCIEYxy(col);
|
||||||
vec3 WhiteYxy = getCIEYxy(vec3(1.));
|
vec3 WhiteYxy = getCIEYxy(vec3(1.));
|
||||||
|
@ -327,21 +327,21 @@ public:
|
|||||||
}; // ComputeGaussian17TapVShader
|
}; // ComputeGaussian17TapVShader
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
class BloomShader : public TextureShader<BloomShader, 1>
|
class BloomShader : public TextureShader<BloomShader, 1, float>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BloomShader()
|
BloomShader()
|
||||||
{
|
{
|
||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "screenquad.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "screenquad.vert",
|
||||||
GL_FRAGMENT_SHADER, "bloom.frag");
|
GL_FRAGMENT_SHADER, "bloom.frag");
|
||||||
assignUniforms();
|
assignUniforms("scale");
|
||||||
assignSamplerNames(0, "tex", ST_NEAREST_FILTERED);
|
assignSamplerNames(0, "tex", ST_NEAREST_FILTERED);
|
||||||
} // BloomShader
|
} // BloomShader
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
void render(GLuint in)
|
void render(GLuint in)
|
||||||
{
|
{
|
||||||
BloomShader::getInstance()->setTextureUnits(in);
|
BloomShader::getInstance()->setTextureUnits(in);
|
||||||
drawFullScreenEffect();
|
drawFullScreenEffect(UserConfigParams::m_scale_rtts_factor);
|
||||||
} // render
|
} // render
|
||||||
}; // BloomShader
|
}; // BloomShader
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user