mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 17:47:34 +08:00
extend sun/moon illuminance sliders
This commit is contained in:
parent
5ef65d94e5
commit
d26a29d1f2
@ -45,7 +45,7 @@ uniform ivec2 eyeBrightnessSmooth;
|
||||
#define TIMEOFDAYFOG
|
||||
#include "/lib/lightning_stuff.glsl"
|
||||
#include "/lib/volumetricClouds.glsl"
|
||||
#include "/lib/volumetricFog.glsl"
|
||||
#include "/lib/overworld_fog.glsl"
|
||||
#endif
|
||||
#ifdef NETHER_SHADER
|
||||
uniform sampler2D colortex4;
|
||||
|
@ -15,6 +15,7 @@ const int colortex9Format = RGBA8; // rain in alpha
|
||||
const int colortex10Format = RGBA16; // resourcepack Skies
|
||||
|
||||
const int colortex11Format = RGBA16; // unchanged translucents albedo, alpha and tangent normals
|
||||
const int colortex14Format = RGBA8; // a = skylightmap for translucents.
|
||||
const int colortex15Format = RGBA8; // flat normals and vanilla AO
|
||||
*/
|
||||
|
||||
|
@ -67,14 +67,13 @@ float blueNoise(){
|
||||
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
|
||||
// const bool shadowHardwareFiltering = true;
|
||||
uniform sampler2DShadow shadow;
|
||||
#define TEST
|
||||
#define TIMEOFDAYFOG
|
||||
#include "/lib/lightning_stuff.glsl"
|
||||
#include "/lib/volumetricClouds.glsl"
|
||||
#include "/lib/volumetricFog.glsl"
|
||||
#include "/lib/overworld_fog.glsl"
|
||||
|
||||
#endif
|
||||
#ifdef NETHER_SHADER
|
||||
|
@ -1,7 +1,3 @@
|
||||
|
||||
vec3 normVec (vec3 vec){
|
||||
return vec*inversesqrt(dot(vec,vec));
|
||||
}
|
||||
float phaseRayleigh(float cosTheta) {
|
||||
const vec2 mul_add = vec2(0.1, 0.28) /acos(-1.0);
|
||||
return cosTheta * mul_add.x + mul_add.y; // optimized version from [Elek09], divided by 4 pi for energy conservation
|
||||
@ -52,28 +48,6 @@ float cloudVol(in vec3 pos){
|
||||
return CloudyFog + UniformFog + RainFog;
|
||||
}
|
||||
|
||||
// // uniform vec4 lightningBoltPosition;
|
||||
// float Iris_Lightningflash_VLfog(vec3 feetPlayerPos, vec3 lightningBoltPos){
|
||||
|
||||
// vec3 LightningPos = feetPlayerPos - vec3(lightningBoltPosition.x, clamp(feetPlayerPos.y, lightningBoltPosition.y, lightningBoltPosition.y+116.0),lightningBoltPosition.z);
|
||||
|
||||
// // point light, max distance is ~500 blocks (the maximim entity render distance)
|
||||
// float lightDistance = 300.0;
|
||||
|
||||
// #ifdef TEST
|
||||
// float lightningLight = 0.0;
|
||||
// #else
|
||||
|
||||
// float lightningLight = max(1.0 - length(LightningPos) / lightDistance, 0.0) ;
|
||||
|
||||
// lightningLight = exp((1.0 - lightningLight) * -15.0) ;
|
||||
// #endif
|
||||
|
||||
// // lightningLight = pow(lightningLight,5.0);
|
||||
|
||||
// return lightningLight ;
|
||||
// }
|
||||
|
||||
uniform bool inSpecialBiome;
|
||||
vec4 GetVolumetricFog(
|
||||
vec3 viewPosition,
|
||||
@ -141,17 +115,6 @@ vec4 GetVolumetricFog(
|
||||
// float upGradient = np3.y;
|
||||
// skyCol0 = max(skyCol0 + skyCol0*upGradient,0.0);
|
||||
|
||||
// #if defined Cave_fog && defined TEST
|
||||
// vec3 cavefogCol = vec3(CaveFogColor_R,CaveFogColor_G,CaveFogColor_B);
|
||||
|
||||
// #ifdef PER_BIOME_ENVIRONMENT
|
||||
// BiomeFogColor(cavefogCol);
|
||||
// #endif
|
||||
|
||||
// cavefogCol = cavefogCol * clamp(1.0 - normalize(wpos).y, 0.0, 1.0) * 0.001 ;
|
||||
// #endif
|
||||
|
||||
|
||||
float mu = 1.0;
|
||||
float muS = mu;
|
||||
float absorbance = 1.0;
|
@ -280,13 +280,13 @@ const float sunPathRotation = -35; //[-90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -8
|
||||
|
||||
#define colortype 2 // 1 = RGB sliders for sun/moon color. 2 = blackbody. [1 2]
|
||||
|
||||
#define sun_illuminance 128000.0 //[10000.0 20000.0 30000.0 40000.0 50000.0 60000.0 70000.0 80000.0 90000.0 100000.0 110000.0 120000.0 130000.0 140000.0 160000.0]
|
||||
#define sun_illuminance 128000.0 //[0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 150.0 200.0 300.0 400.0 500.0 600.0 700.0 800.0 900.0 1000.0 2000.0 3000.0 4000.0 5000.0 6000.0 7000.0 8000.0 9000.0 10000.0 11000.0 12000.0 13000.0 14000.0 15000.0 20000.0 30000.0 40000.0 50000.0 60000.0 70000.0 80000.0 90000.0 100000.0 150000.0 200000.0 250000.0 300000.0 400000.0 500000.0]
|
||||
#define Sun_temp 7000 // [1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 5900 6000 6100 6200 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000]
|
||||
#define sunColorR 1.0 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
#define sunColorG 0.91 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
#define sunColorB 0.81 // [0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
|
||||
#define moon_illuminance 200.0 //[0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 150.0 200.0 300.0 400.0 500.0 600.0 700.0 800.0 900.0 1000.0]
|
||||
#define moon_illuminance 200.0 //[0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 150.0 200.0 300.0 400.0 500.0 600.0 700.0 800.0 900.0 1000.0 2000.0 3000.0 4000.0 5000.0 6000.0 7000.0 8000.0 9000.0 10000.0 11000.0 12000.0 13000.0 14000.0 15000.0 20000.0 30000.0 40000.0 50000.0 60000.0 70000.0 80000.0 90000.0 100000.0 150000.0 200000.0 250000.0 300000.0 400000.0 500000.0]
|
||||
#define Moon_temp 15000 // [1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 5100 5200 5300 4500 5600 5700 5800 5900 6000 6100 6200 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000 15000 20000 25000 50000]
|
||||
#define moonColorR 0.9080 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
#define moonColorG 0.9121 //[0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.0 ]
|
||||
@ -297,16 +297,16 @@ uniform int moonPhase;
|
||||
|
||||
#if colortype == 1
|
||||
#define sunColorBase vec3(sunColorR,sunColorG,sunColorB) * sun_illuminance
|
||||
#define moonColorBase vec3(moonColorR,moonColorG,moonColorB) * moon_illuminance //Fake Purkinje effect
|
||||
#define moonColorBase vec3(moonColorR,moonColorG,moonColorB) * moon_illuminance
|
||||
#else
|
||||
#define sunColorBase blackbody(Sun_temp) * sun_illuminance
|
||||
|
||||
#ifdef MOONPHASE_BASED_MOONLIGHT
|
||||
#define phasebrightness (abs(4-moonPhase))
|
||||
#define moonlightbrightness (phasebrightness/4.0)
|
||||
#define moonColorBase blackbody(Moon_temp) * (moon_illuminance * moonlightbrightness) //Fake Purkinje effect
|
||||
#define moonColorBase (blackbody(Moon_temp) * moon_illuminance) * moonlightbrightness
|
||||
#else
|
||||
#define moonColorBase blackbody(Moon_temp) * moon_illuminance //Fake Purkinje effect
|
||||
#define moonColorBase blackbody(Moon_temp) * moon_illuminance
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -21,6 +21,7 @@ uniform int worldTime;
|
||||
#define WEATHERCLOUDS
|
||||
#include "/lib/climate_settings.glsl"
|
||||
|
||||
|
||||
float CumulusHeight = Cumulus_height;
|
||||
float MaxCumulusHeight = CumulusHeight + 100;
|
||||
float AltostratusHeight = 2000;
|
||||
|
Loading…
Reference in New Issue
Block a user