Added clarification for shader settings

This commit is contained in:
MMqd 2023-06-30 18:09:14 -04:00
parent 0d13f38007
commit df3fe0cbd1
2 changed files with 6 additions and 3 deletions

View File

@ -67,6 +67,9 @@ To implement this sky into a project
7. It may be necessary to reload the scene to make the sky work in the editor 7. It may be necessary to reload the scene to make the sky work in the editor
8. If the sky is very slow try changing the process mode to "High-Quality Incremental" in the Sky settings in the WorldEnvironment 8. If the sky is very slow try changing the process mode to "High-Quality Incremental" in the Sky settings in the WorldEnvironment
To understand what the shader settings do, read the comments in the `nishita_sky.gdshader` file.
The variables prefixed with `precomputed_` are set by the `NishitaSky.gd` script, they cannot be modified.
## Todo ## Todo
* Fix clouds "jumping" after some time * Fix clouds "jumping" after some time
* Clean up code * Clean up code

View File

@ -15,16 +15,16 @@ uniform float precomputed_sun_size
uniform float precomputed_sun_energy = 1.0; uniform float precomputed_sun_energy = 1.0;
uniform float precomputed_background_intensity = 1.0; uniform float precomputed_background_intensity = 1.0;
// Controls the scattering responsible for the blue color of a real life sky // Rayleigh scattering gives the sky its blue color, its effects are visible across the whole sky
uniform vec3 rayleigh_color = vec3(0.258928571428571, 0.580357142857143, 1.0); uniform vec3 rayleigh_color = vec3(0.258928571428571, 0.580357142857143, 1.0);
uniform float rayleigh uniform float rayleigh
: hint_range(0, 64) = : hint_range(0, 64) =
1.0; // higher values absorb more rayleigh_color, more blue by default 1.0; // higher values absorb more rayleigh_color, more blue by default
// Controls the scattering responsible for the white horizon of a real life sky // Mie scattering creates a haze, which is visible around the sun and the horizon
uniform vec3 mie_color = vec3(1.0, 1.0, 1.0); uniform vec3 mie_color = vec3(1.0, 1.0, 1.0);
uniform float mie uniform float mie
: hint_range(0, 64) = 1.0; // higher values make a "foggy" atmosphere : hint_range(0, 64) = 1.0; // increase for a "foggy" atmosphere
uniform float mie_eccentricity : hint_range(-1, 0.99999) = 0.76; uniform float mie_eccentricity : hint_range(-1, 0.99999) = 0.76;
// Sample counts for different parts of the sky // Sample counts for different parts of the sky