17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

Steady the volumetric fog and add a switch for the old headlight beams

This commit is contained in:
2026-10-16 23:23:51 +02:00
parent 8b929fc1da
commit 6ee628aaa5
9 changed files with 114 additions and 32 deletions

View File

@@ -75,6 +75,7 @@ void gl::glsl_common_setup()
"#define MAX_CLOUD_LAYERS " + std::to_string(MAX_CLOUD_LAYERS) + "\n" +
"#define FOG_HORIZON_SAMPLES " + std::to_string(FOG_HORIZON_SAMPLES) + "\n" +
"#define WEATHER_GROUP_SIZE " + std::to_string(WEATHER_GROUP_SIZE) + "\n" +
"#define FOG_VOLUME_BIAS " + std::to_string(FOG_VOLUME_BIAS) + "\n" +
R"STRING(
const uint LIGHT_SPOT = 0U;
const uint LIGHT_POINT = 1U;

View File

@@ -410,6 +410,9 @@ namespace gl
const size_t FOG_HORIZON_SAMPLES = 32;
// work groups of the weather passes: 8x8 for the images, 8x8x1 for the fog volume
const GLuint WEATHER_GROUP_SIZE = 8;
// the slices of the fog volume are spaced exponentially in the view depth plus this many metres: fewer of them go to the first
// metres in front of the camera, more to the distance, where thick slices draw the shafts of light in steps
const float FOG_VOLUME_BIAS = 10.0f;
// layout std140: one layer of clouds (GLSL: cloud_layer_s), see weather_common.glsl
struct cloud_layer_ubs