Update, Update: This code is a combination of crt-geom’s corner code (under GPL) and crt-royale’s border dim code (under MIT).
float corner(vec2 coord)
{
coord *= SourceSize.xy / InputSize.xy;
coord = (coord - vec2(0.5)) * 1.0 + vec2(0.5);
coord = min(coord, vec2(1.0)-coord) * vec2(1.0, OutputSize.y/OutputSize.x);
vec2 cdist = vec2(csize);
vec2 border_penetration =
max(vec2(border_size) - cdist, vec2(0.0));
float penetration_ratio = length(border_penetration)/border_size;
float border_escape_ratio = max(1.0 - penetration_ratio, 0.0);
float border_dim_factor =
pow(border_escape_ratio, border_darkness) * max(1.0, border_compress);
coord = (cdist - min(coord,cdist));
float dist = sqrt(dot(coord,coord));
return clamp((cdist.x-dist)*border_dim_factor,0.0, 1.0);
}
The game isn’t visible at all unless you turn up the border compression to at least like 3-5 or so (and even then the image is super dark)… it also may give you a completely black screen without turning on the corner code(setting corner size at 0.0 gives black, I think…).
It’s still doesn’t work properly but it’s closer to running how I want it to, I guess. Still unusable, though lol.
This uses crt-royale’s settings for border -darkness, compression and size.