top of page
Search
Writer's pictureFox Forge

GPU Programming: Atom Shader | HLSL/CG

Updated: Apr 25

Over in Norway, I learned about HLSL and how to write a basic CG shader in the Unity Game Engine.


The below picture is a video of the shader I created in the 24 hours given to complete the assignment. Our task was to create an atom-like shader. It was purposely vague and graded more on our creativity with knowledge we had independently learned.


Atom Shader


How does it work?

HLSL is quite magic and allows you to manipulate the fragments of the shader in many ways to create whatever you like! In my shader, I applied a new rotation to every "electron" on the atom and then changed colour and size over time depending on how close their positions were to the centre of the atom. What I eventually created actually amazed myself as it appeared to always create a random pattern that never repeated - and is very mesmerising to watch.


Future Showing

I plan to make an online tutorial for this one day as I believe there could be more material on the web to help new programmers with any stigma surrounding shaders.

69 views0 comments

Recent Posts

See All

Comentarios


bottom of page