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
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
. This gives us a bit more freedom to build something fast and responsive with a more suited UI. The backend is a custom ASP.NET server which makes calls to the YouTube API services to retrieve videos.
Theres a few fun new features Ive added here as well that Im excited to expand on in the future.
1. The descriptions support Markdown! This means that we get very pretty descriptions and...
2. Syntax Highlighting! As part of the Markdown support we also are able to add syntax highlighting so languages are displayed in what I hope is a very readable way.
Three examples of this are csharp, java and shader highlighting:
```csharp
var test = Hello, beta.worldofzero.com!;
```
```java
String test = Hello, beta.worldofzero.com!;
```
```shader
float3 = float3(42.0, 9001.0, 3.14159);
```
All languages are distinguished by a unique color and a link to Learn More which Ive tried to link to an online sandbox for that language (try.dot.net in the case of C# and shadertoy.com in the case of shaders). This feature is pretty experimental at this point so Id love to hear your feedback on it!
There are a lot of ways we could improve this more and Id love to get your feedback on what works, what could use more work and cool new features you think would make it even better!
You can checkout the new World of Zero website at http://worldofzero.com
If you want to checkout the code for this new website you can head to: https://github.com/WorldOfZero/dotcom.
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u I Built A New Website](https://i.ytimg.com/vi/BnhiqddQpVo/mqdefault.jpg)


 except now were going to be putting it into practice.
This is the full stream were we start with a new Unity project and build the full Overlay with the capability of displaying infinitely many options in a spinning wheel. There is still plenty we could do to improve this tool further but for an initial test it covers enough.
We also are able to explore how to do web requests in Unity (using Coroutines). This enables us to source our Topic Wheels options from a text file. Typically this isnt very difficult, but because were exporting an HTML5 application well actually need to make a request for a remote resource to grab the text file. In this case the file is located locally on my own computer, but this design also means that we could source text lists from any source we like. Potentially an option we could explore in the future.
Actually building this involved working with a few things I hadnt worked with previously and was a fun experiment. We were able to explore Coroutines slightly as well as dive a bit deeper into Unity UI and how to use it when building this project.
***
You can catch the Live Streams as they happen on Twitch at: twitch.tv/worldofzerodev
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Building the Idea Wheel Prototype - OBS Overlay - From Live Stream](https://i.ytimg.com/vi/CBNO-8OS3wU/mqdefault.jpg)
![Exploring Reflection - Unity Observer - Part 3
Returning to Unity Observer, a project that enables you to easily analyze data in bulk from your Unity scenes. This time were going to dive into taking advantage of C#s reflection and how we can use it to expand the fields we can modify. To start well look into making it possible to edit other Vector3 fields on the Transform component attached to each Game Object.
The process for solving this takes place in a few steps. First we will add a text box that allows us to search for the property or field we want to observe. Then we will need to reflect over the component were inspecting (for now this is hard coded to the Transform component) and attempt to find a field or property that shares the name that was provided. Once we have that we will need to verify that the field/property is of the Vector3 type. For now we only support Vector3s. Once we have a valid Vector3 field or property we can display its current value to in the existing Editor UI and expose it for editing.
By the end of this implementation well be able to find, view and edit any Vector3 member on a Transform component. Some examples of this include `position`, `localPosition` and `localScale`.
Join the World of Zero Discord channel: https://discord.gg/hU5Kq2u
Thumbnail Image Credits:
By Brocken Inaglory [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)], from Wikimedia Commons
https://commons.wikimedia.org/wiki/File:Reflection_in_a_soap_bubble.jpg Exploring Reflection - Unity Observer - Part 3](https://i.ytimg.com/vi/CSPxKW8ntas/mqdefault.jpg)

.
Explore more about FFmpeg at the official website https://ffmpeg.org
Learn how to install FFmpeg: https://ffmpeg.org/download.html
If youd like to use FFmpeg for other things (like converting video snippets to GIFs) check out this blog post from GIPHY: https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Quickly Trim Video Snippets on the Command Line with FFmpeg](https://i.ytimg.com/vi/Cg2omJAOH30/mqdefault.jpg)


.
Moq is a framework for .NET that makes it easy to generate and test mocked code. Given a class you are able to replace that class with a clone that matches all of the type requirements of the class but has none of the implementation leaving the rest up to you. It is compatible with most testing frameworks, but because were hoping to later integrate with Unity 3D as part of our [Platforming game](https://www.youtube.com/playlist?list=PLEwYhelKHmigkz97T76r2bCt7wfG_1pPE) well be testing our integration of Moq with [NUnit](https://nunit.org/).
This framework is new to me so lets explore it together and cover some of the basic use cases that Id like to employ Moq for: Mocking the value of object Properties, Mocking the value of object Functions and Mocking the results of a specific function invocation. From that hopefully well be able to build a better understanding of the capabilities of Moq and how we can best use it to improve the quality of our testing.
***
To add Moq to your dotnet project you can run:
```ps1
dotnet add package Moq
```
Moq is also on GitHub. You can browse the source and see code samples there: https://github.com/moq/moq4
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Im Learning Moq - A .NET Mocking Framework for Unit Tests](https://i.ytimg.com/vi/EJZ2xWGfFQw/mqdefault.jpg)
 in an earlier video series. You can accomplish a lot with basic distance formula to create a number of very cool effects!
If you have suggestions for how we could improve this shader or ideas on what we should do with it next let me know in the comments!
Join the World of Zero Discord channel: https://discord.gg/hU5Kq2u A Static Glowing Ring - Ripple Shader - Part 1](https://i.ytimg.com/vi/EhkBdCdNx-Y/mqdefault.jpg)