Lets Draw A Circle - Circle Pixel Shader - Part 2 @WorldOfZeroDevelopment
Lets Draw A Circle - Circle Pixel Shader - Part 2  @WorldOfZeroDevelopment
Uploaded June 2019 | Updated November 2026, 3 hours ago
Last time we built a grid of pixels for our circular pixel shader. In this video, part 2, we're going to be figuring out how to draw a circle. This will get us both of the component parts we need in order to make this effect work and we can start working on ways to combine the effects.

The circle we're trying to make can be calculated using a formula like this:

```shader
float2 position = float2(0.5, 0.5);
position -= IN.uv_MainTex.xy;
float distance = length(position);
```

The general idea being to create a vector between the current UV coordinate of each fragment and the center of the image. Then, if that vector has a length less than the radius of our circle (0.5 in our case) we want to draw it to be flagged as being inside the circle, otherwise it is outside of it.

Grab the source for the completed shader on GitHub: github.com/WorldOfZero/UnityVisualizations/tree/master/CirclePixels

Join the World of Zero Discord Server: discord.gg/hU5Kq2u
Lets Draw A Circle - Circle Pixel Shader - Part 2I Built A New WebsiteFinding Components on GameObjects - Unity Observer - Part 4Building The Minefield Game Board - From Live StreamBuilding the Idea Wheel Prototype - OBS Overlay - From Live StreamExploring Reflection - Unity Observer - Part 3Handling 3rd Person Camera Physics with SphereCastsQuickly Trim Video Snippets on the Command Line with FFmpegCreating a Quick Custom Profile in the Windows TerminalDemoing the Tool and Adding Command History - LINQ for Unity Stream - Part 2Im Learning Moq - A .NET Mocking Framework for Unit TestsA Static Glowing Ring - Ripple Shader - Part 1
World of Zero |

Lets Draw A Circle - Circle Pixel Shader - Part 2

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER