18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-22 02:05:01 +01:00

Add screen-space contact shadows for the sun, lamps and headlights

This commit is contained in:
2026-10-17 03:11:47 +02:00
parent c4da5c9867
commit 27e5c07837
8 changed files with 268 additions and 25 deletions

View File

@@ -370,6 +370,12 @@ struct global_settings {
// cast them, metres
int gfx_lights_shadows_headlights { 2 };
float gfx_lights_shadows_headlights_range { 250.f };
// (opengl 4.6) contact shadows: short rays through the depth of the scene drawn before its colour (which they turn on, see
// gfx_depthprepass_scene) towards the sun and the nearest lamps. 0 none, 1 low (the sun), 2 medium (and 2 lamps), 3 high
// (and 4 lamps, more steps); the length of the rays and the distance from the camera within which they are traced, metres
int gfx_contactshadows { 0 };
float gfx_contactshadows_length { 0.5f };
float gfx_contactshadows_range { 50.f };
// weather of the opengl 4.6 renderer (debug window "Weather"); the weather itself comes from the scenery, see
// environment/weather.h. fog: 1 volumetric (a volume over the view with the shafts of the sun, the shadows of the clouds and
// the light of lamps and headlights, worked out along the ray past it), 0 analytic (the same fog along the ray only, the way