Gallery

Icicle shader in Unity3D Final

I'm working on a VR game and we needed some ice/icicles. I made a model and a normal map in Blender and wrote a shader in Unity (based on the Refractive Glass sample one). The bulk of the time was spent on the opaque effect in the center of the ice. I render every ice object to a second depth buffer with inverted normals (so I get the back faces). I then sample the second depth buffer when I draw the complete scene. The difference between the depth of the pixel I'm rendering and the depth of the pixel sampled from the depth buffer is the thickness of the object at that point.
0 Comments
Add a Comment