mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Create Scanlines.fsh
This commit is contained in:
parent
2be4bd393a
commit
feed5a2246
1 changed files with 22 additions and 0 deletions
22
assets/shaders/Scanlines.fsh
Normal file
22
assets/shaders/Scanlines.fsh
Normal file
|
@ -0,0 +1,22 @@
|
|||
//Simple Scanlines shader
|
||||
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
uniform sampler2D sampler0;
|
||||
float offset = 1.0;
|
||||
float frequency = 170.0;
|
||||
|
||||
varying vec2 v_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float pos0 = (v_texcoord0.y + offset) * frequency;
|
||||
float pos1 = cos((fract( pos0 ) - 0.5)*3.14);
|
||||
vec4 pel = texture2D( sampler0, v_texcoord0 );
|
||||
|
||||
gl_FragColor = mix(vec4(0,0,0,0), pel, pos1);
|
||||
}
|
Loading…
Add table
Reference in a new issue