Sitemap
Aaron Hedquist

Aaron Hedquist

Engineer @ Polyarc Games

Basic Rim Shader

1 min readJan 19, 2018

You can create a basic “rim shader,” which adds color around the edges of polygons, using the dot product of the view direction and surface normal per-pixel:

Get Aaron Hedquist’s stories in your inbox

Join Medium for free to get updates from this writer.

half rim = 1 - saturate( dot( normalize(IN.viewDir), o.Normal) );
o.Emission = rim * _RimColor;
Press enter or click to view image in full size

--

--