mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-01 01:11:46 +00:00
7c8a6c88d6
Man, so picky. May improve #4188.
23 lines
498 B
GLSL
23 lines
498 B
GLSL
// Simple Scanlines shader, created to use in PPSSPP.
|
|
// Looks good at Internal resolution same as viewport.
|
|
|
|
#ifdef GL_ES
|
|
precision mediump float;
|
|
precision mediump int;
|
|
#endif
|
|
|
|
uniform sampler2D sampler0;
|
|
varying vec2 v_texcoord0;
|
|
|
|
float offset = 1.0;
|
|
float frequency = 166.0;
|
|
|
|
void main()
|
|
{
|
|
float pos0 = (v_texcoord0.y + offset) * frequency;
|
|
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);
|
|
}
|