Jinn

A BSc Psychology and Bachelor of Game Development Graduate.

A quick learner and gamer full with passions.

Do visit my LinkedIn for more about me.

First Custom Shader in Unity

I learned about vertex shader and fragment shader in OpenGL during my university. I figured it would be a good experience to get my hands on Unity ShaderLab. To clarify, I didn’t have any clear goal in mind but just playing around while learning. Which means there probably should have better implementation/visual effect somewhere online.

To create above effect, I used 2 noise textures to randomize if the processing pixel should go in which directions.

Instead of animation or put one sprite on top of another, I combine both textures with a parameter. This created the above effect. Code

Continuing on shader experiment, I wanted to create an aura effect, such as a customized shadow indicating character presence.

From the Code, it shows that the created effect is kind of hardcoded. Therefore, I went online to do some googling which leads me to this.

And I learnt about Grab Pass and ComputeGrabScreenPos by creating the following effects. Code.

“X-Ray” using ComputeGrabScreenPos and tex2Dproj.