Skip to content

Stylized post-processing shaders for Godot 4. Modular FX for retro visuals, pixelation, dithering, and palette mapping.

License

Notifications You must be signed in to change notification settings

devkcud/VesperaFX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ VesperaFX - Modular Post-Processing Shader Suite

Includes: Dithering, palette mapping, pixelation, sharpening, color correction, CRT effects, and VHS effects.
Modular. Yankable. Yours to break.

VesperaFX is a modular, stylized post-processing shader for Godot 4.4.1, featuring dithering, palette-based color mapping, pixelation, sharpening, CRT/VHS effects, and flexible color adjustments.
Designed for retro visuals, game feel tweaking, and full control over your post-FX pipeline.

Important

This repo is not supposed to be a one-size-fits-all solution. It is a toolbox of modular effects you can pick and choose from. Feel free to yank ONLY what you need!

Shader Demo

Btw, this GIF is actually an older version of the shader. The current one has way more features!

Examples of shading

Unshaded

Shader Demo

2 Palette Black-White

Shader Demo

2 Palette Black-White + Sharpening

Shader Demo

2 Palette True Black-White with Level 4 Dithering

Shader Demo

2 Palette True Black-White with Level 4 Error Diff Dithering with Color Correction (Hue Shift)

Shader Demo

5 Palette with Default Params

Shader Demo

5 Palette Level 2 Dithering with Color Correction + Pixelation

Shader Demo

5 Palette Level 2 Dithering, RGB Matching and Color Correction + Pixelation

Shader Demo

5 Palette Level 2 Error Diff Dithering with Color Correction

Shader Demo

🎨 Features

Quite a few! Here's what you get:

  • Runtime editing via shader uniforms
  • Dithering
    • Multiple modes:
      • Bayer
      • Noise
      • Pseudo Floyd-Steinberg
      • Blue Noise
      • Real Floyd-Steinberg
  • Palette-based color mapping via luminance, brute-force RGB, or LUT
    • LUT/texture blend for smooth transitions
    • Transitions between palette lines
    • Precomputed LUT support
  • Pixelation with custom grid size
  • Sharpening
    • Configurable intensity
    • Multiple kernel support
      • Laplacian
      • Unsharp Mask
      • Bilateral
      • High Boost
      • Edge Detection
  • Cartoon/Toon shading
  • Cartoon/Toon effects
    • Wobble
    • Swirl
    • Stretch
    • Outline
  • Drug effects
    • Trails
    • Chromatic aberration
    • Psychedelic Warp
  • Color adjustments: hue, saturation, contrast, gamma
  • PS1-style vertex jitter effects
  • CRT effects
    • Vignette (edge darkening)
    • Scanlines (resolution-aware)
    • Barrel/Pincushion warp (separate X/Y control)
    • Black bars (letterbox/pillarbox)
  • VHS effects
    • Chromatic aberration (RGB offset)
    • Tracking lines (animated distortion bands)
    • Noise/grain (animated static)
  • Modular .gdshaderinc files. Use only what you need.
  • Well-documented and commented code for easy customization.
  • Configurable effect order (dithering <-> palette mapping)
  • Performance considerations (LUT blending, pixelation-sharpen combo)
  • Utility functions for shared logic
  • Spatial shader version
    • 3D dithering
    • Palette mapping for 3D scenes (LUT and RGB)
    • CRT/VHS effects for 3D scenes
    • Pixelation and sharpening for 3D scenes
    • Depth-aware effects
      • Near/Far distortion
      • Foggy dithering based on distance
      • Color loss and overexposure based on distance
  • Reflective surfaces support
    • Dithering on reflections
    • Palette mapping on reflections
    • Pixelation and sharpening on reflections
  • Render class for easy integration
    • One-click setup
    • Preset management
    • Profile saving/loading
    • GUI for runtime tweaking
    • Controller support for adjustments on the fly
    • Animation support for dynamic effects
  • Demo scenes showcasing various effects and combinations
  • Precomputed LUT generation tool
  • RGB palette generation tool

📦 Implementation

  1. Clone or copy the shader files into your project. You'll find each effect in the include/ directory.
  2. Create a new .gdshader file in your project.
  3. Include the modules you want (or everything) using:
#include "res://path/to/include/dither.gdshaderinc"
#include "res://path/to/include/palette.gdshaderinc"
  1. Copy relevant logic from void fragment() in main.gdshader or build your own.

🧪 Usage Notes

  • RGB palette matching uses brute-force comparison per pixel. This is slow. Consider using precomputed LUT for better performance.
  • Pixelation + Sharpening may cause artifacts. There's a flag (#define ALLOW_PIXELATION_SHARPEN_COMBO) to allow it, but it's not recommended unless you really want it.
  • Effect order defaults to: Dither -> Palette Map. You can flip it by: #define REVERSE_DITHER_PALETTE_MAPPING.
  • LUT/texture blending computes both mappings simultaneously. Enable with #define ALLOW_PALETTE_LUT_BLEND. May impact performance on low-end GPUs.
  • You may also include utils.gdshaderinc for constants and shared helpers.

⚙️ Files

File Purpose
dither.gdshaderinc Multiple dithering modes
palette.gdshaderinc Palette mapping (RGB, luminance, LUT)
pixelation.gdshaderinc Pixel grid reduction
sharpening.gdshaderinc Sharpen filters (multiple kernels)
rendering.gdshaderinc Hue/saturation/contrast/gamma
ps1.gdshaderinc PS1-style texture jitter
crt.gdshaderinc CRT effects (vignette, scanlines, warp)
crt.gdshaderinc VHS effects (chromatic, tracking, noise)
utils.gdshaderinc Shared utility functions

You can yank one or all. Everything is compartmentalized.

📜 License

This shader is released under the Mozilla Public License 2.0.

Credit is optional, but always appreciated.
Author: André Albanese Junior (@patomcio / @devkcud)

🧯 Support

This isn't a framework, it is a toolbox. If you need help integrating or customizing, feel free to reach out via GitHub issues or social media.


⭐ If you find this repo useful, consider starring! :D

About

Stylized post-processing shaders for Godot 4. Modular FX for retro visuals, pixelation, dithering, and palette mapping.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published