Update scanlines.fsh

This commit is contained in:
danyalzia 2013-10-15 02:46:28 +05:00
parent 2f95aef77c
commit 90c8cba39e

View File

@ -1,7 +1,10 @@
// Simple Scanlines shader, created to use in PPSSPP.
// Looks good at Internal resolution same as viewport.
#define PI 3.14159
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D sampler0;
varying vec2 v_texcoord0;
@ -12,7 +15,7 @@ float frequency = 166;
void main()
{
float pos0 = (v_texcoord0.y + offset) * frequency;
float pos1 = cos((fract( pos0 ) - 0.5)*PI);
float pos1 = cos((fract( pos0 ) - 0.5)*3.14159);
vec4 pel = texture2D( sampler0, v_texcoord0 );
gl_FragColor = mix(vec4(0,0,0,0), pel, pos1);