mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-23 01:59:39 +08:00
fix hardcoded ambient light skylight direction being used when rtao/ssgi are enabled. remove skylight direction as lightmap falls off for all AO effects.. bring back lightning flash effect on the world
This commit is contained in:
parent
2a5de55319
commit
6fdc95dff4
@ -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 ////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -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;
|
||||
|
@ -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<maxIT_clouds;i++) {
|
||||
|
||||
// IntersecTerrain = length(progress_view - cameraPosition) > lViewPosM;
|
||||
|
Loading…
Reference in New Issue
Block a user