11-11-2021, 11:05 PM
(11-11-2021, 09:02 PM)el_rika Wrote: (...)
sadly it doesn't work
(...)
Try this then
Code:
const float customX = 4.0; //edit only values in here
const float customY = 3.0; // here
const float zoom = 3.0; // and here, through you can set automatic zoom based on X or Y few lines lower
void main() {
float zoomByX = 16.0 / customX;
float zoomByY = 9.0 / customY;
float zoomByXY = zoom;
//zoomByXY = zoomByX;
// uncomment the above or below(remove // before the code) to have it zoom based on X or Y edge instead of the zoom you manually typed in above
//zoomByXY = zoomByY;
float xdivision = 1.0 / (customX / 16.0 * zoomByXY);
float ydivision = 1.0 / (customY / 9.0 * zoomByXY);
float2 vCoord0 = GetCoordinates().xy;
float3 color = Sample().xyz;
color = SampleLocation(float2(vCoord0.x * xdivision - (0.5 + xdivision / 2.0 - 1.0), vCoord0.y * ydivision - (0.5 + ydivision / 2.0 - 1.0)).xy).xyz;
// Remove color bleed outside of the game scene caused by shrinking
float rangex = (0.5 + (xdivision / 2.0 - 1.0)) / xdivision;
float rangey = (0.5 + (ydivision / 2.0 - 1.0)) / ydivision;
if (vCoord0.x < rangex || vCoord0.x > 1.0 - rangex || vCoord0.y < rangey || vCoord0.y > 1.0 - rangey) {
color.xyz = float3(0.0,0.0,0.0).xyz;
}
SetOutput(float4(color.rgb, 1.0));
}I also changed settings to change 16:9 into 4:3 aspect ratio to see it's effect by default.
Also yeah Dolphin does use HLSL in their shaders, they define it into GLSL through, probably to make use of it on d3d and ogl backends without auto-translation that PPSSPP does.
http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.

