mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-20 07:57:55 +08:00
fix issue where "render clouds as fog" setting would still work when "cumulus clouds" were disabled.
This commit is contained in:
parent
2dda68cf5b
commit
62bae31aa3
@ -329,7 +329,6 @@ uniform int moonPhase;
|
|||||||
#define CLOUDS_QUALITY 0.5 // [0.1 0.125 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.9 1.0]
|
#define CLOUDS_QUALITY 0.5 // [0.1 0.125 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.9 1.0]
|
||||||
|
|
||||||
#ifdef VOLUMETRIC_CLOUDS
|
#ifdef VOLUMETRIC_CLOUDS
|
||||||
#define RAYMARCH_CLOUDS_WITH_FOG
|
|
||||||
|
|
||||||
#ifndef ambientLight_only
|
#ifndef ambientLight_only
|
||||||
#define CLOUDS_SHADOWS
|
#define CLOUDS_SHADOWS
|
||||||
@ -351,6 +350,9 @@ uniform int moonPhase;
|
|||||||
|
|
||||||
#define Cumulus2_coverage 0.3 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
#define Cumulus2_coverage 0.3 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||||
|
|
||||||
|
#if defined Cumulus && defined VOLUMETRIC_CLOUDS
|
||||||
|
#define RAYMARCH_CLOUDS_WITH_FOG
|
||||||
|
#endif
|
||||||
|
|
||||||
#define Altostratus
|
#define Altostratus
|
||||||
#define Alto_coverage 0.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
#define Alto_coverage 0.1 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||||
|
@ -268,11 +268,11 @@ vec4 renderClouds(
|
|||||||
// terrible fake rayleigh scattering
|
// terrible fake rayleigh scattering
|
||||||
vec3 rC = vec3(sky_coefficientRayleighR*1e-6, sky_coefficientRayleighG*1e-5, sky_coefficientRayleighB*1e-5)*3;
|
vec3 rC = vec3(sky_coefficientRayleighR*1e-6, sky_coefficientRayleighG*1e-5, sky_coefficientRayleighB*1e-5)*3;
|
||||||
float atmosphere = exp(abs(forg.y) * -5.0);
|
float atmosphere = exp(abs(forg.y) * -5.0);
|
||||||
vec3 scatter = exp(-10000.0 * rC * atmosphere) * distantfog;
|
vec3 scatter = mix(vec3(1.0), exp(-10000.0 * rC * atmosphere) * distantfog, heightRelativeToClouds);
|
||||||
|
|
||||||
directScattering *= distantfog;
|
directScattering *= scatter;
|
||||||
directMultiScattering *= distantfog;
|
directMultiScattering *= scatter;
|
||||||
sunIndirectScattering *= distantfog;
|
sunIndirectScattering *= scatter;
|
||||||
|
|
||||||
#ifdef Cumulus
|
#ifdef Cumulus
|
||||||
for(int i = 0; i < maxIT_clouds; i++) {
|
for(int i = 0; i < maxIT_clouds; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user