In our final Episode 8 of the Snake Rewind devlog we dive deep into postprocessing effects to give our game a full retro CRT vibe. From scanlines and flicker to distortion and RGB channel splitting, this episode brings raw visual style to the grid.
What We Covered
- Implemented animated scanlines with configurable frequency and opacity
- Added subtle light flicker for a dynamic CRT shimmer
- Applied sine based screen distortion to simulate signal warping
- Built a chromatic aberration shader (chromasep) to split RGB channels
This episode is all about turning the clean pixel grid into something with personality: unstable, glitchy and wonderfully retro.
Design Insights
- Scanlines are a sine modulation on brightness based on
fragTexCoord.y - Flicker is time based and global, modulating brightness subtly
- Distortion uses UV displacement with sine waves for wobbly lines
- Chromasep offsets the red and blue channels using a randomized
distortion - Effects are layered in order: base scene → glow → scanlines → distortion → chromasep
Implementation Highlights
- This episode’s effects all reside in
scanline.glslshader - Used
globalTimerutilizingGetFrameTime()to animate phase and flicker over time - Used a temporary
RenderTexture2Dto chain passes cleanly - Composited the final output directly to the screen
External Resources
- Creating a scanline effect in Shadertoy - initial source for scanline shader, but we built our own thing
- Mini: Chromatic Aberration
Tweak and Expand
- Add background music and sound effects (based on free assets). I will gladly merge your PR if you would like to contribute.
- Clean up the main file and split relevant functionality to specialized header/implementation files
- Extract some parameters from shaders as uniforms and configured them from our
main - Add any other effects you think will make the game look even better!