CRT-Guest-Advanced, HD and NTSC for ReShade!

Just set Resolution_X to 960 for 16:9. As I showed in my examples above, for me it’s 1920 for 4:3 and 2560 for 16:9.

2 Likes

that hack seems work

but isnt better to add new Aspect Ratio option? so both black bars and sharp 4:3 in 16:9 will work

1 Like

Hi all. Great shader and thank you for sharing your work. I’m confused on what to put for resolution_x and resolution_y. I’m using PCSX2 and CRT-Guest-Advanced. Should the resolutions match the actual resolutions of PS2 games? I am using native resolutions in PCSX2.

@Jobima I’ll look into this today (if I get some free time) or the next weekend. But, no promises.

1 Like

Your screenshots look amazing. Can’t get games too look like that on PCSX2 or Dolphin on my screen. What settings do you use? I also have a 1440p monitor.

1 Like

Let me try to understand what you’re doing. You set a 4:3 resolution for your monitor without scaling by chopping off the side pixels (2560 -> 1920). The internal resolution parameter tells the shader that you have 4x more pixels than native (1920 horizontal pixels and 1440 vertical pixels) and will correctly blur and blend with the extra pixels.

The internal resolution parameter usually is used when upscaling, i.e. increased native resolution is set in the emulator, if it’s set to native, setting internal res high in the shader should degrade the image unreasonably.

My suggestion for a display res of 1920x1440 would actually be to set Guest res parameters to 1920 and 480 and then switch through the interlace settings of the shaders, it should make a difference (e.g. interlace off will show notable scanlines with default settings because of the vertical scale factor of 3) You can also experiment with different res (preferably even dividers), e.g. 960x720 or just set to display res.

1 Like

Hey, @Jobima I was looking around for some Aspect Ratio shaders for reference, so I could implement them in the Guest shaders.

Instead I found something better here - https://github.com/akgunter/reshade-utility-shaders. (You can use these with any shaders you like.)

Step 1 - Drag the TransformViewport shader to the top and then the Unstretch shader to the bottom in the ReShade menu like this -

Step 2 - In TransformViewport set Input Resolution XY to the 4:3 (or any other) aspect Resolution you want (like 1440 for a 1920x1080 monitor) -

Step 3 - Finally in Unstretch set Desired Aspect Ratio to 4:3 aspect ratio (or any other) you want -

That’s all. Try it and see if this works for you too.

2 Likes

It’s a mixture of some shaders with CRT-Guest-HD on top. I can post a link if you want them.

that work

but as I said before “crt mask will be distorted”

you can see there are something like Moire effect

and here how it look with retroarch or 960 hack

I would love that. Since I can’t seem to get it to look that good myself, so would really appreciate your settings for everything. :smile:

Hey all, I can use these shaders with Reshadeck on the Steam Deck correct? What resolution should I set them to?

Just set both Resolution_X and Resolution_Y to the resolution of the console you are emulating. For PC pixel art games you can just google the game’s original pixel resolution and use that.

HERE - ReShade-Shaders. The presets labeled with 1920 are for 4:3 games (on a 1440p monitor) and the one labeled 2560 are for 16:9 game. You can use Res-O-Matic to run standalone emulators at 4:3.

I just made the necessary changes (added OutputSize_X and OutputSize_Y) to the Guest shaders to fix that issue, it looks better, but it doesn’t seem to completely fix the Masks (it fixed the Corner and Border effects though).

Res-O-Matic -

Default shader -

Shader with changes -

I don’t know what else I can do here. Maybe you can figure something out in the shader - CRT-Guest-NTSC Aspect Ratio TEST. Don’t forget to set OutputSize_X to 1440.

1 Like

thanks! here what I get

and yes, the mask look kinda off, also there are a blur with Resolution_X =720, even with 960 is kinda has blur compared to previous solutions

how the retroarch deal with it? maybe just use crop in the mask part? since the crt mask is the same in both 4:3 and 16:9 in Res-O-Matic and retroarch

The only difference I can think of is that in RetroArch the last pass (deconvergence.slang) where the MASK (and many more like - Border, Corner and Post Brightness etc) calculations are done, is rendered out to a Texture the size of Viewport (Output Size).

And if I do the same in ReShade (render out the last pass to a texture), instead of rendering it out to the Backbuffer. This happens (MASK and many more effects don’t work) -

(This is the same preset that I posted screenshots from in my last reply to you.)

If you still want a AspectRatio shader that you can use with other shaders (this will still mess with some effects like CRT Masks). I made one (code blatantly stolen from CRT-Royale ReShade Port) -

#include "ReShade.fxh"

#define OptSize float4(BUFFER_SCREEN_SIZE,1.0/BUFFER_SCREEN_SIZE)

#ifndef AspectSize_X
#define AspectSize_X BUFFER_SCREEN_SIZE.x
#endif

#ifndef AspectSize_Y
#define AspectSize_Y BUFFER_SCREEN_SIZE.y
#endif

#define SIZE_S00 ReShade::BackBuffer

static const float2 boxsize=float2(AspectSize_X,AspectSize_Y);
static const float2 expanse=boxsize/ (2*OptSize.xy);
static const float2 capital=0.0/OptSize.xy+0.5;
static const float coord_w=capital.x-expanse.x;
static const float coord_e=capital.x+expanse.x;
static const float coord_n=capital.y-expanse.y;
static const float coord_s=capital.y+expanse.y;
static const float2 correct=float2(coord_w,coord_n);

void CropProcessVS(in uint id:SV_VertexID,out float4 position:SV_Position,out float2 texcoord:TEXCOORD)
{
	#if __RENDERER__ <= 0x09300
	texcoord.x=(id==1||id==3)?coord_e:coord_w;
	texcoord.y=(id>1)?coord_s:coord_n;
	position.x=(id==1||id==3)? 1:-1;
	position.y=(id>1)?-1: 1;
	position.zw=1;
	#else
	texcoord.x=(id&1)?coord_e:coord_w;
	texcoord.y=(id&2)?coord_s:coord_n;
	position.x=(id&1)? 1:-1;
	position.y=(id&2)?-1: 1;
	position.zw=1;
	#endif
}

float4 StockPassPS(float4 position:SV_Position,float2 texcoord:TEXCOORD):SV_Target
{
	return tex2D(SIZE_S00,texcoord);
}

float4 RatioSizePS(float4 position:SV_Position,float2 texcoord:TEXCOORD):SV_Target
{
	const bool margins=float(texcoord.x>=coord_w&&texcoord.x<=coord_e&&texcoord.y>=coord_n&&texcoord.y<=coord_s);
	const float2 boxcoord=((texcoord-correct)*OptSize.xy+0)/boxsize;
	const float4 boxcolor=tex2D(SIZE_S00,boxcoord);
	return float4(margins*boxcolor.rgb,boxcolor.a);
}

technique Aspect_Crop
{
	pass
	{
	VertexShader=CropProcessVS;
	PixelShader=StockPassPS;
	PrimitiveTopology=TRIANGLESTRIP;
	VertexCount=4;
	}
}

technique Aspect_Size
{
	pass
	{
	VertexShader=PostProcessVS;
	PixelShader=RatioSizePS;
	}
}

Just drag Aspect_Crop to the top and Aspect_Size to the bottom in the ReShade menu. Then use AspectSize_X and AspectSize_Y to change the ratios.

2 Likes

@DevilSingh what about making OutputSize_X and OutputSize_Y crop the input for CRT-Guest (CRT-Guest will see it similar as Res-O-Matic method) but for the final output alpha (invisible) border will be added to pad the CRT-Guest output to the screen resolution?