Add soft shadows

This commit is contained in:
Lauri Räsänen 2023-11-04 20:24:18 +02:00
parent 6c9fd76c42
commit 61e95cb550
3 changed files with 31 additions and 10 deletions

View file

@ -1,3 +1,6 @@
const PI = 3.14159;
const INV_SQRT_2 = 0.70710678118654752440; // 1 / sqrt(2)
const INV_SQRT_3 = 0.57735026918962576451; // 1 / sqrt(3)
const INV_SQRT_3 = 0.57735026918962576451; // 1 / sqrt(3)
const SHADOW_SAMPLES = 8;
const INV_SHADOW_SAMPLES = 1.0 / 8.0;
const SHADOW_SAMPLE_DIST = 0.001;