Clean up constants in shaders

This commit is contained in:
Lauri Räsänen 2023-11-11 17:13:14 +02:00
parent 09e0feb4ff
commit 8b99a617f4
3 changed files with 7 additions and 6 deletions

View file

@ -1,10 +1,12 @@
const PI = 3.14159;
const INV_SQRT_2 = 0.70710678118654752440; // 1 / sqrt(2)
const INV_SQRT_3 = 0.57735026918962576451; // 1 / sqrt(3)
// in every direction from 0,0
// total = (2n + 1)^2
const SHADOW_SAMPLES = 2;
const INV_SHADOW_SAMPLES = 1.0 / 25.0;
const FOG_MAX_STEPS = 30;
const FOG_STEP_SIZE = 5.0;
const FOG_LIGHT_MAX_STEPS = 10;
@ -13,3 +15,6 @@ const FOG_DENSITY = 2.0;
const FOG_LIGHT_DENSITY = 3.0;
const FOG_ALPHA = 1.0;
const FOG_AMBIENT = 0.06;
const FOG_DENSITY_COLOR = vec2<f32>(0.5, 0.1);
const PBR_AMBIENT = 0.02;