mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow the server to control fog_distance and fog_start via the sky-api (#13448)
This commit is contained in:
parent
dde8f0e20a
commit
0ade097e99
11 changed files with 80 additions and 21 deletions
|
@ -3,6 +3,7 @@ uniform sampler2D baseTexture;
|
|||
uniform vec3 dayLight;
|
||||
uniform vec4 skyBgColor;
|
||||
uniform float fogDistance;
|
||||
uniform float fogShadingParameter;
|
||||
uniform vec3 eyePosition;
|
||||
|
||||
// The cameraOffset is the current center of the visible world.
|
||||
|
@ -49,9 +50,6 @@ varying vec3 tsEyeVec;
|
|||
varying vec3 lightVec;
|
||||
varying vec3 tsLightVec;
|
||||
|
||||
const float fogStart = FOG_START;
|
||||
const float fogShadingParameter = 1.0 / ( 1.0 - fogStart);
|
||||
|
||||
#ifdef ENABLE_DYNAMIC_SHADOWS
|
||||
|
||||
// assuming near is always 1.0
|
||||
|
|
|
@ -3,6 +3,7 @@ uniform sampler2D baseTexture;
|
|||
uniform vec3 dayLight;
|
||||
uniform vec4 skyBgColor;
|
||||
uniform float fogDistance;
|
||||
uniform float fogShadingParameter;
|
||||
uniform vec3 eyePosition;
|
||||
|
||||
// The cameraOffset is the current center of the visible world.
|
||||
|
@ -48,9 +49,6 @@ varying float nightRatio;
|
|||
|
||||
varying float vIDiff;
|
||||
|
||||
const float fogStart = FOG_START;
|
||||
const float fogShadingParameter = 1.0 / (1.0 - fogStart);
|
||||
|
||||
#ifdef ENABLE_DYNAMIC_SHADOWS
|
||||
|
||||
// assuming near is always 1.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue