Skip to content

Instantly share code, notes, and snippets.

@QuadStorm
QuadStorm / CHSS_frag.glsl
Last active February 6, 2022 06:46
Contact-Hardening Soft Shadows for Blockland - Soft shadows that realistically soften or harden based on distance (NVIDIA version)
#version 120
#extension GL_EXT_texture_array : require
#extension GL_EXT_texture_array : enable
// Originally Port's Poisson Disc (Optimized) Soft Shadow Shader (2015), modified by Stealth Commander/QuadStorm
// Includes a Contact-Hardening/Percentage-Closer/Perceptually-Correct Soft Shadows (CHSS/PCSS) implementation, and other many configurable variables
// 10th version
// Configuration: For the adventurous!