Port this CRT shader to Reshade

More
2 years 4 days ago #1 by emanuads
Port this CRT shader to Reshade was created by emanuads
Hi all! Is anybody able to port this CRT filter from PPSSPP emulator to reshade? It looks very good to me. Thanks!

// Retro (CRT) shader, created to use in PPSSPP.

#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif

uniform sampler2D sampler0;
varying vec2 v_texcoord0;
uniform vec4 u_time;

void main()
{
    // scanlines
    int vPos = int( ( v_texcoord0.y + u_time.x * 0.5 ) * 272.0 );
    float line_intensity = mod( float(vPos), 2.0 );
    
    // color shift
    float off = line_intensity * 0.0005;
    vec2 shift = vec2( off, 0 );
    
    // shift R and G channels to simulate NTSC color bleed
    vec2 colorShift = vec2( 0.001, 0 );
    float r = texture2D( sampler0, v_texcoord0 + colorShift + shift ).x;
    float g = texture2D( sampler0, v_texcoord0 - colorShift + shift ).y;
    float b = texture2D( sampler0, v_texcoord0 ).z;
    
    vec4 c = vec4( r, g * 0.99, b, 1.0 ) * clamp( line_intensity, 0.85, 1.0 );
    
    float rollbar = sin( ( v_texcoord0.y + u_time.x ) * 4.0 );
    
    gl_FragColor.rgba = c + (rollbar * 0.02);
}

Please Log in or Create an account to join the conversation.

More
2 years 3 days ago - 2 years 3 days ago #2 by Marot
Replied by Marot on topic Port this CRT shader to Reshade

Hi all! Is anybody able to port this CRT filter from PPSSPP emulator to reshade? It looks very good to me. Thanks!

Here you go, I have to agree that it does look pretty good:

github.com/Mortalitas/GShade-Shaders/blo.../Shaders/RetroCRT.fx
Last edit: 2 years 3 days ago by Marot.
The following user(s) said Thank You: emanuads

Please Log in or Create an account to join the conversation.

More
2 years 3 days ago #3 by emanuads
Replied by emanuads on topic Port this CRT shader to Reshade
You're the man! I'm gonna test it out as soon as I can!

Please Log in or Create an account to join the conversation.