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
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.
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.
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 solutionshow 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.
@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?
Sorry. But I don’t think I understand your question here. Can you clarify what you are asking for?
Aspect ratio shader should work with horizontal tweaks if it’s put in the chain before guest-advanced.
If it’s applied later, then ofc. masks would be distorted.
Wouldn’t that be pointless? Then the Aspect Ratio shader will just behave like a crop shader only -
It’s not like CRT-Guest can access this cropped area to output to. We need something that can actually change the backbuffer size.
This is exactly what the Aspect Ratio shader does. (Other than adding alpha at the end.)
Aspect Ratio OFF -
Aspect Ratio ON -
I meant that as a CRT-Guest update to do this internally (Not literally, but as a general idea) so the crt mask will not be distorted, In other words make it kinda act like retroarch
Okay, so turns out I was being a dumbass (as always). Adding Aspect Ratio to the Guest shaders (or any shader) is easy. Please try this CRT-Guest-HD Aspect Ratio TEST.
See if MASK looks right for you too, and try to change both Resolution and AspectSize settings to random values to check if anything breaks.
Everything is working on my end -
can you make a test for ntsc one too please?