// Base distortion
uniform highp float DistortionScalar; // Scales the total distortion applied to the final image.
+const highp float DistortionCoordScalar = 0.1125; //Scales the coordinates for the distortion texture
const highp float DistortionCenterRadius = 200.0; // radius of the gradient used to tone down the distortion effect
const highp float DistortionCenterMinDist = 0.25; // minimum distance from the center of the screen for the distortion to appear at all
const highp float DistortionCenterPow = 1.1; // the exponent used for the distortion center
highp float distortionZoom = pow(Zoom, DistortionZoomPow);
- highp float centergradient = zCircleGradient(aspect * 0.5, FRAGCOORD.xy, DistortionGradientMax, DistortionCenterRadius / distortionZoom, DistortionCenterMinDist / distortionZoom, DistortionCenterPow);
- highp vec2 coord = (FRAGCOORD.xy * SCREEN_PIXEL_SIZE.xy) * aspect * centergradient * 0.0001; // That magic number on the end there is due to how tiny the FBM noise is. It's incredibly noisy.
+ highp float centergradient = zCircleGradient(aspect, FRAGCOORD.xy, DistortionGradientMax, DistortionCenterRadius / distortionZoom, DistortionCenterMinDist / distortionZoom, DistortionCenterPow);
+ highp vec2 coord = (FRAGCOORD.xy * SCREEN_PIXEL_SIZE.xy) * centergradient * DistortionCoordScalar;
highp vec2 offset = vec2((zFBM(coord * NoiseScalar + timesin) - 0.5) * centergradient, (zFBM(coord * NoiseScalar + timecos) - 0.5) * centergradient);
COLOR = zTextureSpec(SCREEN_TEXTURE, Pos + (offset * DistortionScalar));
highp float cloudyZoom = pow(Zoom, CloudinessZoomPow);
- highp float cloudygradient = zCircleGradient(aspect * 0.5, FRAGCOORD.xy, CloudinessGradientMax, CloudinessCenterRadius / cloudyZoom, CloudinessCenterMinDist / cloudyZoom, CloudinessCenterPow) * CloudinessScalar;
+ highp float cloudygradient = zCircleGradient(aspect, FRAGCOORD.xy, CloudinessGradientMax, CloudinessCenterRadius / cloudyZoom, CloudinessCenterMinDist / cloudyZoom, CloudinessCenterPow) * CloudinessScalar;
COLOR.rgb = mix(COLOR.rgb, vec3(zGrayscale(COLOR.rgb)), min(cloudygradient * CloudinessGrayscaleMult, CloudinessGrayscaleMax));
COLOR.rgb = pow(COLOR.rgb, vec3((cloudygradient * CloudinessScalar + 1.0)));
-uniform sampler2D SCREEN_TEXTURE;
uniform highp float Zoom;
uniform highp float CircleRadius; //= 15.0; // radius of the circular gradient
-uniform highp float CircleMinDist; //= 0.25; // minimum distance from the center of the screen for the 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.
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 * 0.5, FRAGCOORD.xy, CircleMax, CircleRadius / actualZoom, /*CircleMinDist / actualZoom*/ 0.0, CirclePow) * CircleMult;
+ 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));
}