-->

Traditional Chinese Painting Shader

Platform: Unity 3D

In order to show traditional Chinese painting effect, I implement two main functions. One function is the edge detection, Edge = Dot( Normal , View ), which is used to draw black lines of the mountain to show the edges. Another function is change the colors. Considering there are not many colors are used in traditional Chinese paintings, I reduce the categories of color by merging similar colors. I utilize some images with Chinese brush textures to enhance the textures of the edges of the color blocks.



Magic Wand

Platform: Unity 3D       Language: C#

In a magic world, you are a talented magician who can use magic element of fire, water and thunder. Your hometown is occupied by lots of magic monsters and it is time for you to use magic to fight with them. On one hand, you are holding a magic wand. You can wave magic wand to use magic spells. Hold trigger and swing clockwise for 2 turns to get a fire element. Hold trigger and swing clockwise for half turn to get a water element. Hold trigger and swing a Z shape to get a thunder element. Your magic wand can contain four magic elements at the same time. Different combo of magic elements can create different effects. When you want to release your spell, hold the trigger on the other hand to aim and shoot.



Crystal Shader on Horse

Platform: Unity 3D

In order to implement the visual effect of crystal I have to raytrace both reflections and refractions. I use a indoor CubeMap to provide the surrounding color and use R = I - 2.f * N * dot(I, N) to get the directions of reflections and use the Snell's Law to get the directions of refraction light. Then I use Schlick’s approximation R(θ) = R0 + (1 - R0)(1 - cosθ)⁵ to combine the effects of reflections and refractions.



Spell Sword

Platform: Unity 3D       Language: C#

I introduce several innovative interactions in this VR world. Player could use sword to interact with objects in game, for example, player can use put sword into a portal to teleport into a different map; player can use sword to touch a letter on the floor or table to pop up letter in front of camera to read the letter easily; player can draw magic figures in VR to cast magic power like fire on sword to fight against enemy.



Lighting Simulation Shader

Platform: Unity 3D

I use the model's normal information to do the texture sampling in order to simulate the lighting effects. I can change different textures to create various lighting effects.



Snow Particle Effect & Snow Shader

Platform: Unity 3D

The core algorithm is o.Color = step(1-_Snow,v.normal.y)*fixed3(1,1,1), which makes the parts like dog's back and head covered with snow. I can change the _Snow to enlarge the parts with snow.



Knit Fabric Shader on Cat

Platform: Unity 3D

According to the cat's grid data, I use each triangle on it to generate a outward-pointing "pyramid" with fabric texture to make the cat's surface look like knit fabric.



Deep Ocean Shader

Platform: Unity 3D

Generate ripples on different layers and simulate refraction effects.