2024-01-03 04:07:02 -05:00
|
|
|
uniform highp float Zoom;
|
2023-12-29 01:38:08 +00:00
|
|
|
|
2024-01-03 04:07:02 -05:00
|
|
|
uniform highp float CircleRadius; //= 15.0; // radius of the circular gradient
|
2024-01-03 19:17:06 -05:00
|
|
|
uniform highp float CircleMinDist; //= 0.0; // minimum distance from the center of the screen for the gradient
|
2024-01-03 04:07:02 -05:00
|
|
|
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.
|
2018-12-13 07:47:19 -06:00
|
|
|
|
2023-12-29 01:38:08 +00:00
|
|
|
|
2024-01-03 04:07:02 -05:00
|
|
|
void fragment(){
|
|
|
|
|
highp vec2 aspect = vec2(1.0/SCREEN_PIXEL_SIZE.x, 1.0/SCREEN_PIXEL_SIZE.y);
|
|
|
|
|
highp float actualZoom = Zoom;
|
2019-06-23 16:44:39 +05:00
|
|
|
|
2024-01-03 19:17:06 -05:00
|
|
|
highp float circle = zCircleGradient(aspect, FRAGCOORD.xy, CircleMax, CircleRadius / actualZoom, CircleMinDist / actualZoom, CirclePow) * CircleMult;
|
2024-01-03 04:07:02 -05:00
|
|
|
COLOR = mix(vec4(0.0), vec4(vec3(0.0), 1.0), clamp(circle, 0.0, 1.0));
|
2020-08-28 00:04:44 +01:00
|
|
|
}
|