Hey, @Pluuth and @AliAkbar. You can use my CRT-Geom port to get perfect scanlines in Ragebound (Just set Resolution_Y to 540 not 270) -
uniform float gm_crt <
ui_type = "drag";
ui_min = 0.5;
ui_max = 4.0;
ui_step = 0.05;
ui_label = "CRT Gamma";
> = 2.4;
uniform float gm_lcd <
ui_type = "drag";
ui_min = 0.5;
ui_max = 4.0;
ui_step = 0.05;
ui_label = "LCD Gamma";
> = 2.2;
uniform float brightness <
ui_type = "drag";
ui_min = 0.25;
ui_max = 5.0;
ui_step = 0.01;
ui_label = "Brightness";
> = 1.0;
uniform float dmw <
ui_type = "drag";
ui_min = 0.0;
ui_max = 1.0;
ui_step = 0.05;
ui_label = "Mask Strength";
> = 0.3;
uniform float wib <
ui_type = "drag";
ui_min = 0.1;
ui_max = 0.5;
ui_step = 0.05;
ui_label = "Scanlines Strength";
> = 0.3;
uniform float gauss_scanlines <
ui_type = "drag";
ui_min = 0.0;
ui_max = 1.0;
ui_step = 1.0;
ui_label = "Gaussian Scanlines";
> = 0.0;
uniform float csize <
ui_type = "drag";
ui_min = 0.0;
ui_max = 0.25;
ui_step = 0.005;
ui_label = "Corner Size";
> = 0.0;
uniform float bsize <
ui_type = "drag";
ui_min = 0.0;
ui_max = 3.0;
ui_step = 0.01;
ui_label = "Border Size";
> = 0.01;
uniform float sborder <
ui_type = "drag";
ui_min = 0.25;
ui_max = 2.0;
ui_step = 0.05;
ui_label = "Border Intensity";
> = 0.75;
uniform float warpx <
ui_type = "drag";
ui_min = 0.0;
ui_max = 0.25;
ui_step = 0.01;
ui_label = "Curvature X (Default 0.03)";
> = 0.0;
uniform float warpy <
ui_type = "drag";
ui_min = 0.0;
ui_max = 0.25;
ui_step = 0.01;
ui_label = "Curvature Y (Default 0.04)";
> = 0.0;
uniform float c_shape <
ui_type = "drag";
ui_min = 0.05;
ui_max = 0.6;
ui_step = 0.05;
ui_label = "Curvature Shape";
> = 0.25;
#include "ReShade.fxh"
#define TexSize float2(Resolution_X,Resolution_Y)
#define IptSize float2(Resolution_X,Resolution_Y)
#define OptSize float4(BUFFER_SCREEN_SIZE,1.0/BUFFER_SCREEN_SIZE)
#define SrcSize float4(TexSize,1.0/TexSize)
#define aspect float2(1.0,0.75)
#define FIX(c) max(abs(c),1e-5)
#define PI 3.14159265
#define mod_fact texcoord.x*TexSize.x*OptSize.x/IptSize.x
#define TEX2D(c) tex2D(GEOM_S00,(c))
#ifndef Resolution_X
#define Resolution_X 320
#endif
#ifndef Resolution_Y
#define Resolution_Y 240
#endif
#define GEOM_S00 ReShade::BackBuffer
uniform int framecount<source="framecount";>;
float2 curve(float2 pos)
{
pos=pos*2.0-1.0;
pos=lerp(pos,float2(pos.x*rsqrt(1.0-c_shape*pos.y*pos.y),pos.y*rsqrt(1.0-c_shape*pos.x*pos.x)),float2(warpx,warpy)/c_shape);
return pos*0.5+0.5;
}
float corner(float2 pos)
{
float2 bc=bsize*float2(1.0,OptSize.x/OptSize.y)*0.050;
pos=clamp(pos,0.0,1.0);
pos=abs(2.0*(pos-0.5));
float csz=lerp(400.0,7.0,pow(4.0*csize,0.10));
float crn=dot(pow(pos,csz.xx*float2(1.0,OptSize.y/OptSize.x)),1.0.xx);
crn=(csize==0.0)? max(pos.x,pos.y):pow(crn,1.0/(csz));
pos=max(pos,crn);
float2 rs=(bsize==0.0)? 1.0.xx:lerp(0.0.xx,1.0.xx,smoothstep(1.0.xx,1.0.xx-bc,sqrt(pos)));
rs=pow(rs, sborder.xx);
return sqrt(rs.x*rs.y);
}
float mod(float x,float y)
{
return x-y* floor(x/y);
}
float4 scanlines(float distance,float4 color)
{
if(gauss_scanlines==1.0)
{
float4 wid=0.3+0.1*pow(color,3.0);
float4 wld=distance/wid;
return 0.4*exp(-wld*wld)/wid;}else
{
float4 wid=2.0+2.0*pow(color,4.0);
float4 wld=distance/wib;
return 1.4*exp(-pow(wld*rsqrt(0.5*wid),wid))/(0.6+0.2*wid);
}
}
float4 GeomPS(float4 position:SV_Position,float2 texcoord:TEXCOORD):SV_Target
{
float2 ilfac=float2(1.0,clamp(floor(IptSize.y/200.0),1.0,2.0));
float2 xy=curve(texcoord);
float2 ilvec=float2(0.0,0.0>1.5?mod(framecount,2.0):0.0);
float2 ratio_scale=(xy*TexSize-0.5+ilvec)/ilfac;
float2 uv_ratio=frac(ratio_scale);
float2 cone=ilfac/TexSize;
float2 yx=xy;
float cval=corner(xy);
float clear=fwidth(ratio_scale.y);
xy=(floor(ratio_scale)*ilfac+0.5-ilvec)/TexSize;
float4 co=PI*float4(1.0+uv_ratio.x,uv_ratio.x,1.0-uv_ratio.x,2.0-uv_ratio.x);
co =FIX(co);
co =2.0*sin(co)*sin(co/2.0)/(co*co);
co/=dot(co,1.0);
float4 col0=clamp(TEX2D(xy+float2(-cone.x,cone.y))*co.x+TEX2D(xy+float2(0.0,cone.y))*co.y+TEX2D(xy+cone)*co.z+TEX2D(xy+float2(2.0*cone.x,cone.y))*co.w,0.0,1.0);
float4 col1=clamp(TEX2D(xy+float2(-cone.x,0.0))*co.x+TEX2D(xy)*co.y+TEX2D(xy+float2(cone.x,0.0))*co.z+TEX2D(xy+float2(2.0*cone.x,0.0))*co.w,0.0,1.0);
col0=pow(col0,gm_crt);
col1=pow(col1,gm_crt);
float4 weights0=scanlines(1.0-uv_ratio.y,col0);
float4 weights1=scanlines( uv_ratio.y,col1);
uv_ratio.y=uv_ratio.y+1.0/3.0*clear;
weights0=(weights0+scanlines(abs(1.0-uv_ratio.y),col0))/3.0;
weights1=(weights1+scanlines(abs( uv_ratio.y),col1))/3.0;
uv_ratio.y=uv_ratio.y-2.0/3.0*clear;
weights0=(weights0+scanlines(abs(1.0-uv_ratio.y),col0))/3.0;
weights1=(weights1+scanlines(abs( uv_ratio.y),col1))/3.0;
float3 mul_res=(col1*weights1+col0*weights0).rgb;
float3 maskweights=lerp(float3(1.0,1.0-dmw,1.0),float3(1.0-dmw,1.0,1.0-dmw),floor(mod(mod_fact,2.0)));
mul_res*=maskweights;
mul_res=pow(mul_res,1.0/gm_lcd);
return float4(mul_res*brightness*cval,1.0);
}
technique CRT_Geom
{
pass
{
VertexShader=PostProcessVS;
PixelShader=GeomPS;
}
}
Resolution_Y = 270 -
Resolution_Y = 540 -
If you want something similar in the Guest-Advanced shaders. You need to ask @guest.r for EVEN/ODD scanlines.


it was ok for me so better to be added in the next update



