Slip Drift City
- Andrew Decker
- Feb 9, 2024
- 2 min read
Our new project is a racing game with a comic book inspired art style. My first task was to create a cel shader for the project. Here is some of my process behind making it. All 3D assets shown is the video are my original work.

I started my process by making the cel shader, since that is most familiar to me. I used if-statement logic to map the luminance values to set amounts to make the shading comic-like. I had to overcome a variety of technical challenges of using unreal engine to prevent this look from flickering and jittering, and eventually I was able to achieve a stable effect.

After the cel shader, I created an outline material using a variety of custom material functions for detecting edges from depth, normals, and colors. The shader is customizable using material parameters that I've created for thickness, threshold, and max distances for the outline to appear.

Here is one of the material functions that I created that takes a pixel and its adjacent pixels, and compares the distance. If the distance is great enough, the portion will appear black, forming a line around objects with different depths. The part below outlines portions f the scene that I've stenciled out with a custom depth stencil. (This part has been revised to use comparative depth between the custom and scene depth to prevent clipping when applied to translucent materials.)

This part of the cel shader takes the stenciled out portion of the screen and applies a hue shift, blackens out desaturated portions, adds more saturation to colored portions, and adds chromatic aberration, to create a dream-like state.

Here is the chromatic aberration part of the shader that isolates the red green and blue channels and offsets them from the center of the screen.


Comments