Merge pull request #4351 from DanyalZia/patch-32

Slightly improves scanlines
This commit is contained in:
Henrik Rydgård 2013-10-28 08:10:36 -07:00
commit fc2edfa8b3
2 changed files with 7 additions and 7 deletions

View File

@ -445,6 +445,7 @@ void CreditsScreen::render() {
"vnctdj",
"kaienfr",
"shenweip",
"Danyal Zia",
"",
"",
c->T("specialthanks", "Special thanks to:"),

View File

@ -8,18 +8,17 @@ precision mediump int;
uniform sampler2D sampler0;
varying vec2 v_texcoord0;
float offset = 1.0;
float frequency = 166.0;
float amount = 1.0; // suitable range = 0.0 - 1.0
float intensity = 0.5; // suitable range = 0.0 - 1.0
void main()
{
float pos0 = (v_texcoord0.y + offset) * frequency;
float pos1 = cos((fract( pos0 ) - 0.5)*3.1415926);
vec4 pel = texture2D( sampler0, v_texcoord0 );
float pos0 = ((v_texcoord0.y + 1.0) * 170.0*amount);
float pos1 = cos((fract( pos0 ) - 0.5)*3.1415926*intensity)*1.5;
vec4 rgb = texture2D( sampler0, v_texcoord0 );
// slight contrast curve
vec4 color = pel*0.5+0.5*pel*pel*1.2;
color *= 2.0;
vec4 color = rgb*0.5+0.5*rgb*rgb*1.2;
// color tint
color *= vec4(0.9,1.0,0.7, 0.0);