Unity Graph Shaders

A couple of exercises to experiment with the new Unity Lightweight Rendering Pipeline (LWRP) and the Unity Graph Shaders. At this time, this visual programming tool is a developing technology. It is still rather buggy (as I found), but when refined will be a great asset in the Unity toolkit.

Planet and Moon Shader

Unity make it really easy to generate “standard” planets like Mars on the left. However, the Moon is a tricky body to write a shader for, as it’s a fairly reflective body, so the bright side is reflecting sunshine AND (in some conditions) the dark side is partially illuminated by light reflecting off the earth. For this shader, a number of uniforms are compared to the surface normals to establish the emission and albedo.

Unity Inspector View of the Moon shader in operation

Car Paint Shader

Also using the Unity Graphs Shaders, a model was downloaded from (THIS LINK) and a number of shaders applied to different materials (glass, plastics, etc). The most complex being the Car Paint Shader, which used Fresnel reflections and a 2D colour map. The before and after are shown below.

Car Model : Before
Car Model: After