diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index 8d78284..9ec8898 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -825,15 +825,17 @@ void main() { ///////////////////////////// INDIRECT LIGHTING ///////////////////////////// ///////////////////////////////////////////////////////////////////////////////// - #ifdef OVERWORLD_SHADER + #if defined OVERWORLD_SHADER && (indirect_effect == 0 || indirect_effect == 1) + vec3 ambientcoefs = slopednormal / dot(abs(slopednormal), vec3(1)); float SkylightDir = ambientcoefs.y*1.5; if(isGrass) SkylightDir = 1.25; - - float skylight = max(pow(viewToWorld(FlatNormals).y*0.5+0.5,0.1) + SkylightDir, 0.25) ; + float skylight = max(pow(viewToWorld(FlatNormals).y*0.5+0.5,0.1) + SkylightDir, 0.25 + (1.0-lightmap.y) * 0.75) ; + AmbientLightColor *= skylight; + #endif #ifdef NETHER_SHADER @@ -852,9 +854,10 @@ void main() { #endif Indirect_lighting = DoAmbientLightColor(AmbientLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy); - - // Indirect_lighting += LightningFlashLighting; - + + #ifdef OVERWORLD_SHADER + Indirect_lighting += LightningFlashLighting; + #endif //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////// UNDER WATER SHADING //////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// diff --git a/shaders/lib/indirect_lighting_effects.glsl b/shaders/lib/indirect_lighting_effects.glsl index 6cee1e1..c757bd7 100644 --- a/shaders/lib/indirect_lighting_effects.glsl +++ b/shaders/lib/indirect_lighting_effects.glsl @@ -257,6 +257,8 @@ void ApplySSRT( #ifdef OVERWORLD_SHADER if(isGrass) rayDir.y = clamp(rayDir.y + 0.5,-1,1); + rayDir.y = mix(-1.0,rayDir.y, lightmaps.y*lightmaps.y); + skycontribution = (skyCloudsFromTexLOD(rayDir, colortex4, 0).rgb / 10.0) * Lighting.a + Lighting.rgb; #else skycontribution = (skyCloudsFromTexLOD2(rayDir, colortex4, 6).rgb / 10.0) * Lighting.a + Lighting.rgb; @@ -267,7 +269,7 @@ void ApplySSRT( if(isGrass) rayDir.y = clamp(rayDir.y + 0.25,-1,1); #endif - skycontribution = skylightcolor * (max(rayDir.y,0.0)*0.9+0.1) + Lighting.rgb; + skycontribution = skylightcolor * (max(rayDir.y,pow(1.0-lightmaps.y,2))*0.9+0.1) + Lighting.rgb; #if indirect_effect == 4 skycontribution2 = skylightcolor + Lighting.rgb; diff --git a/shaders/lib/volumetricClouds.glsl b/shaders/lib/volumetricClouds.glsl index 26e922a..f917a70 100644 --- a/shaders/lib/volumetricClouds.glsl +++ b/shaders/lib/volumetricClouds.glsl @@ -261,13 +261,6 @@ vec4 renderClouds( #ifdef Cumulus - - // float shadowStepSize[3] = float[]( - // 0.05, - // 0.25 + Dither.y*0.1, - // 0.50 + Dither.y*0.1 - // ); - for(int i=0;i lViewPosM;