• Stars
    star
    573
  • Rank 77,865 (Top 2 %)
  • Language ShaderLab
  • License
    MIT License
  • Created over 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

My Unity post processing pipeline and shaders

Post Processing Pipeline For Unity

This code accompanies my series on Post Processing on YouTube.

This is made for Unity 2021.3.1 using the built in pipeline.

Disclaimer

These effects are modular only for ease of experimentation and finding what looks best for a given scene. Once desired effects have been found, many of the shaders can be condensed into a singular pass to reduce overdraw and maximize performance.

Most of these are also not production ready, they are meant to be referenced for those looking to implement the effects themselves. While they are generally well optimized, they may not account for specific edge cases or might be lacking in desirable features.

Features

  • Fog
    • Distance
  • Bloom (HDR)
  • Depth Based Edge Detection
  • Color Correction (HDR)
    • Exposure
    • White Balancing
    • Contrast
    • Brightness
    • Color Filtering
    • Saturation
  • Tonemapping
    • RGB Clamp
    • Tumblin Rushmeier
    • Schlick
    • Ward
    • Reinhard
    • Reinhard Extended
    • Hable
    • Uchimura
    • Narkowicz ACES
    • Hill ACES
  • Hue Shifting
  • Sharpness
    • Basic Sharpening
    • Contrast Adaptive Sharpness
  • Blend Modes
    • Add/Subtract
    • Multiply
    • Color Burn
    • Color Dodge
    • Overlay
    • Soft Light
    • Vivid Light
  • Pixel Art Effects
    • Downsampling
    • Dithering
    • Color Palette Swapping
  • Gamma Corrector
  • CRT Shader (not included with this repo)
  • Color Blindness
    • Protanopia/Protanomaly
    • Deuteranopia/Deuteranomaly
    • Tritanopia/Tritanomaly
  • Kuwahara Filtering
    • Basic Kuwahara
    • Generalized Kuwahara
    • Anisotropic Kuwahara w/ Polynomial Weighting
  • Zoom
    • Anti Aliased Pixel Art Upscaler
  • Difference Of Gaussians
    • Basic
    • Extended
  • Vignette
  • Chromatic Aberration
  • Blur
    • Box
    • Gaussian

Examples

Unmodified

noeffects

Fog

fog

Bloom

bloom

Color Correction (RGB Clamped)

colorcorrect

Hue Shifting

hueshift

Sharpness

sharpness

Tonemapping

Tumblin Rushmeier

tumblinrushmeier

Schlick

schlick

Ward

ward

Reinhard

reinhard

Reinhard Extended

reinhardextended

Hable

hable

Uchimura

uchimura

Narkowicz ACES

narkowicz

Hill ACES

hill

Blend Modes

All examples are blended with themselves, the image is a gradient from no blending to full blend.

Add

addblend

Subtract

subtract

Screen

screen

Multiply

multiply

Color Dodge

colordodge

Color Burn

colorburn

Overlay

overlay

Soft Light

softlight

Vivid Light

vividlight

Pixel Art

Open images in their full resolution for optimal viewing. Sheik model is exported from melee.

sheik

2x Downsample

downsampled_sheik

1x Downsample + Dither

dithered_sheik

1x Downsample + Dither + Sharpness

sharp_dither

Still Frame:

sharp_dither_still

Color Palette Swapping

Original Colors:
dithered_grass

Palette Swapped (8-bit):
color_swapped

Color Blindness Simulation

Protanopia (Absent L-cone)

protanopia

Deuteranopia (Absent M-cone)

deuteranopia

Tritanopia (Absent S-cone)

tritanopia

More Details

These shaders are useful for testing the usability of your game from the perspective of those with color blindness.

Consider the case below, with the default red and green health bars it is hard for someone who suffers from deuteranopia (the most common form of color blindness) to tell the difference between them at a glance.

league1

Riot Games is aware of this issue and provides a color blind mode in the options which changes ally health bars to a bright yellow, making the value difference between allies and enemies quite obvious.

league2

Kuwahara Filter

Basic

kuwabasic

Generalized

kuwageneralized

Anisotropic

kuwaanisotropic

References

https://catlikecoding.com/unity/tutorials/custom-srp/color-grading/
https://github.com/tizian/tonemapper
https://en.wikipedia.org/wiki/Ordered_dithering
https://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html
https://en.wikipedia.org/wiki/Kuwahara_filter

More Repositories

1

AcerolaFX

A suite of GShade shaders for Final Fantasy XIV
HLSL
896
star
2

Water

Sum of sines and fft fluid simulation with a physically based water shader
C#
360
star
3

Grass

An exploration of various grass rendering techniques
C#
256
star
4

Pixel-Sorting

A "real time" pixel sorter for Unity
C#
190
star
5

Shell-Texturing

Volumetric rendering of fur
C#
175
star
6

CS2-Smoke-Grenades

My recreation of CS2's responsive smoke grenades in Unity
C#
165
star
7

Inktober-Ink-Shader

An ink drawing post processing shader
ShaderLab
70
star
8

Disney-PBR

An implementation of Disney's principled BRDF
C#
52
star
9

CRT-Shader

A recreation of Loop Hero's CRT shader
C#
45
star
10

Minecraft-Shaders

Shaders for Minecraft
GLSL
40
star
11

obs-scripts

OBS scripts I have made to help my stream and others
Python
31
star
12

Cellular-Automata

Unity project demonstrating concepts introduced in my video on Cellular Automata
C#
28
star
13

The-Dating-Game

My submission for Ludwig's 2021 10 day game jam
C#
26
star
14

Elden-Ring-Stars

A recreation of Elden Ring's star particles
C#
20
star
15

Gooch-Shading

An implementation of Gooch Shading
ShaderLab
17
star
16

Image-Effects

Post processing in Unity
C#
7
star
17

World-Generator

Terrain generator for environment inspiration
GLSL
6
star
18

Chaikin-Curves

Code for my animation used for my video on Chaikin Curves
JavaScript
5
star
19

GarrettGunnell

4
star
20

Compute-Particles

GPU driven particle system demonstration
C#
3
star
21

Graphics-Reference-Sheet

Graphics programming related notes
3
star
22

Ray-Marcher

That thing literally everyone makes
C#
3
star
23

Watchy-Firmware

My firmware for the Watchy, an open source E-ink watch
C
3
star
24

Linear-Congruential-Generator

Basic python LCG
Python
3
star
25

DirectX11-Base-Framework

A basic DX11 framework that renders a textured quad
C++
2
star
26

Fluid-Simulation

Shallow water equations modeled in Unity
C#
2
star
27

Pixel-Sorter

Python
1
star
28

Data-Structures-Handbook

A collection of data structures I've learned.
1
star
29

Compute-Ray-Tracer

GPU Ray Tracing
C#
1
star
30

Marching-Cubes

Marching Cubes is an algorithm for triangulating procedural meshes
C#
1
star
31

cs160-zombulator

Zombie outbreak simulator for cs160.
JavaScript
1
star
32

Portfolio

My portfolio website
Svelte
1
star
33

Random-Shaders

Miscellaneous shaders
ShaderLab
1
star
34

Ray-Tracer

My implementation of a ray tracer following Jamis Buck's 'The Ray Tracer Challenge'
C++
1
star