Use custom opengl call for bloom fullscreen shader.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15022 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
2dea6ded0d
commit
9968ff1ccf
@ -2,10 +2,12 @@
|
|||||||
uniform sampler2D tex;
|
uniform sampler2D tex;
|
||||||
uniform float low;
|
uniform float low;
|
||||||
|
|
||||||
|
in vec2 uv;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 weights = vec3(0.2126, 0.7152, 0.0722); // ITU-R BT. 709
|
vec3 weights = vec3(0.2126, 0.7152, 0.0722); // ITU-R BT. 709
|
||||||
vec3 col = texture2D(tex, gl_TexCoord[0].xy).xyz;
|
vec3 col = texture2D(tex, uv).xyz;
|
||||||
float luma = dot(weights, col);
|
float luma = dot(weights, col);
|
||||||
|
|
||||||
col *= smoothstep(low, 0.9, luma);
|
col *= smoothstep(low, 0.9, luma);
|
||||||
|
10
data/shaders/screenquad.vert
Normal file
10
data/shaders/screenquad.vert
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#version 130
|
||||||
|
|
||||||
|
in vec2 Position;
|
||||||
|
in vec2 Texcoord;
|
||||||
|
out vec2 uv;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
uv = Texcoord;
|
||||||
|
gl_Position = vec4(Position, 0., 1.);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user