Shader Writing in Unity

For the last six months I started to work on shader writing in Unity. Following is some of the shaders I did.

Visual Likeness

I worked on a visual likeness project. I created a shader using the Cook - Torrance model. On the left, you can see the reference picture and on the right, you can see the render from Unity3D .for the reflection on the coffee table I used the Blinn model with a reflection probe from Unity.

All the models in the project are from asset store and I modified some of the models to fit the reference image. For the textures, I used substance painter. This shader only uses a diffuse and a normal map as an input. For the reflections, I used two parameters named diffuse and smoothness factor.

Title of Image


Escape the Flood

The following is a mini platformer game where the player tries to escape the city before the flood. The controls are W,A,S,D which moves the car around. W,S for going backward and forward and A,D for steering the car. To steer the car the player needs to be moving.

The game has three main custom shaders. The water shader uses a noise to create the waves on the surface. It has inputs for the foam where the water connects with any surrounding objects.

The mirror shader uses a reflection probe It is set to update every frame to create an updated reflection map than I used a script to feed the new reflection map to the shader. Also, I moved the reflection probe with the cars forward axis

The opacity shader uses a transparent Blinn model and looks raycasting to determine if there is an object between the cat and the camera. Then it changes the alpha value of the object's shader.