Fake 3D Cylinder Shader (Like the one seen in FNAF)

I finally figured it out. I did a bunch of trial and error and discovered that white will move pixels upward and black will move pixels downward and that grey (aka 0% 0% 50% Brightness on HSB scale) is neutral. I applied a gradient that evenly goes from black to grey to white from the bottom to top and then applied a gradient that goes from fully transparent to grey to fully transparent from side to side. That results in getting the Panorama/Tunnel effect.

7 Likes