mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
fix atmosphere haze absorbance. fix small specular reflection issue
This commit is contained in:
@ -68,7 +68,7 @@ vec4 GetVolumetricFog(
|
||||
vec3 LightColor,
|
||||
vec3 AmbientColor,
|
||||
vec3 AveragedAmbientColor,
|
||||
inout vec3 cloudDepth
|
||||
inout float atmosphereAlpha
|
||||
){
|
||||
#ifndef TOGGLE_VL_FOG
|
||||
return vec4(0.0,0.0,0.0,1.0);
|
||||
@ -266,6 +266,7 @@ vec4 GetVolumetricFog(
|
||||
vec3 Atmosphere = (LightSourcePhased * sh * (rayL*rL + sunPhase*m) + AveragedAmbientColor * (rL+m) * (lightLevelZero*0.99 + 0.01)) * inACave;
|
||||
color += (Atmosphere - Atmosphere * atmosphereVolumeCoeff) / (rL+m+1e-6) * atmosphereAbsorbance * totalAbsorbance;
|
||||
atmosphereAbsorbance *= dot(atmosphereVolumeCoeff, vec3(0.33333));
|
||||
|
||||
//------------------------------------
|
||||
//------ LPV FOG EFFECT
|
||||
//------------------------------------
|
||||
@ -335,6 +336,7 @@ vec4 GetVolumetricFog(
|
||||
if (totalAbsorbance < 1e-5) break;
|
||||
#endif
|
||||
}
|
||||
atmosphereAlpha = atmosphereAbsorbance;
|
||||
return vec4(color, totalAbsorbance);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#define SHADER_VERSION_LABEL 477 // [477]
|
||||
#define SHADER_VERSION_LABEL 478 // [478]
|
||||
|
||||
#define saturate(x) clamp(x,0.0,1.0)
|
||||
|
||||
|
@ -243,7 +243,7 @@ void DoSpecularReflections(
|
||||
#ifdef Sky_reflection
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
if(hasReflections) Background_Reflection = (skyCloudsFromTexLOD(L, colortex4, sqrt(Roughness) * 9.0).rgb / 30.0) * Metals ;
|
||||
if(hasReflections) Background_Reflection = (skyCloudsFromTex(L, colortex4).rgb / 30.0) * Metals ;
|
||||
#else
|
||||
if(hasReflections) Background_Reflection = (skyCloudsFromTexLOD2(L, colortex4, sqrt(Roughness) * 6.0).rgb / 30.0) * Metals;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user