Files
tbd-station-14/Resources/Textures/Shaders/circle_mask.swsl
deathride58 6901e930b5 Blindness hotfix (content side) (#23465)
* fixes major blindness issues like blindness not scaling with render res

* HEY. get outta there
2024-01-04 11:17:06 +11:00

17 lines
899 B
Plaintext

uniform highp float Zoom;
uniform highp float CircleRadius; //= 15.0; // radius of the circular gradient
uniform highp float CircleMinDist; //= 0.0; // minimum distance from the center of the screen for the gradient
uniform highp float CirclePow; //= 0.5; // the exponent used for the gradient
uniform highp float CircleMax; //= 4.0; // Maximum value for the gradient used for the gradient. Don't worry, the end result gets clamped.
uniform highp float CircleMult; //= 0.5; // Multiplier for the total value of the circle gradient.
void fragment(){
highp vec2 aspect = vec2(1.0/SCREEN_PIXEL_SIZE.x, 1.0/SCREEN_PIXEL_SIZE.y);
highp float actualZoom = Zoom;
highp float circle = zCircleGradient(aspect, FRAGCOORD.xy, CircleMax, CircleRadius / actualZoom, CircleMinDist / actualZoom, CirclePow) * CircleMult;
COLOR = mix(vec4(0.0), vec4(vec3(0.0), 1.0), clamp(circle, 0.0, 1.0));
}