Welcome, Guest.
Username: Password: Remember me

TOPIC: Port this CRT shader to Reshade

Port this CRT shader to Reshade 1 month 2 days ago #1

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);
}
The administrator has disabled public write access.

Port this CRT shader to Reshade 1 month 1 day ago #2

emanuads wrote:
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:

https://github.com/Mortalitas/GShade-Shaders/blob/master/Shaders/RetroCRT.fx
Last Edit: 1 month 1 day ago by Marot.
The administrator has disabled public write access.
The following user(s) said Thank You: emanuads

Port this CRT shader to Reshade 1 month 9 hours ago #3

You're the man! I'm gonna test it out as soon as I can!
The administrator has disabled public write access.