meta data for this page
- en
Shadow - Technical Details on Radius
Why call it "Radius"?
In graphics programming, shadows are often created using a Gaussian Blur. To create this effect, the software looks at a single pixel and then looks at the pixels surrounding it within a certain distance to decide how to blend them.The “Radius” is that distance.
- If the radius is 10px, the software calculates the blur by looking 10 pixels in every direction from the edge of your object. The larger the radius, the further the color “bleeds” out, making the shadow look softer and more diffuse.
Breaking Down Radius Values
Specific Total Launcher values translate to what is seen on the screen:
| Value | Visual Result | What’s Happening Mathematically |
|---|---|---|
| 0 | Invisible | The software essentially “turns off” the shadow calculation. |
| 1 – 5 | Sharp Drop Shadow | The blur distance is so small that the edges remain crisp. It looks like a hard sticker or a “cutout” effect. |
| 6 – 20 | Soft Shadow | The edges begin to plume outward. This mimics a light source that is relatively close to the object. |
| 50+ | Diffuse/Floating | The shadow spreads very far and becomes very faint, making the object look like it's hovering high above the background. |
How "Blur Radius" Works Internally
Total Launcher utilizes the Android system's graphics engine to render shadows, typically using a Gaussian Blur algorithm.
The Mathematical Kernel
When a radius is set the software creates a “sampling window” (a kernel). If the radius is 5, the software looks at every pixel and averages its color with the pixels 5 spaces away in every direction.
The Light Source Analogy
Technically, the “Radius” is simulating the Umbra and Penumbra:
- Umbra (The Core): The darkest part of the shadow, defined by the Offset.
- Penumbra (The Blur): The soft transition from dark to transparent, defined by the Radius.
Performance Note
Higher radius values require more processing power because the “sampling window” grows exponentially.
- For example, a radius of 20 requires the GPU to look at significantly more neighboring pixels than a radius of 2.
On older devices, very high shadow radii across many items can occasionally impact scrolling smoothness.
Discussion