mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
Imrpove RTAO and SSGI and add the option to make them take the sky into account.
This commit is contained in:
@ -21,6 +21,17 @@ vec3 DoAmbientLighting (vec3 SkyColor, vec3 TorchColor, vec2 Lightmap, float sky
|
||||
return SkyLight * skyLightDir + TorchLight;
|
||||
}
|
||||
|
||||
void DoRTAmbientLighting (vec3 TorchColor, vec2 Lightmap, inout float SkyLM, inout vec3 TorchLight, inout vec3 SkyLight){
|
||||
|
||||
float TorchLM = 10.0 - ( 1.0 / (pow(exp(-0.5*inversesqrt(Lightmap.x)),5.0)+0.1));
|
||||
TorchLM = pow(TorchLM/4,10) + pow(Lightmap.x,1.5)*0.5;
|
||||
TorchLight = (TorchColor * TorchLM * 0.75) * TORCH_AMOUNT;
|
||||
|
||||
SkyLM = (pow(Lightmap.y,15.0)*2.0 + pow(Lightmap.y,2.5))*0.5;
|
||||
|
||||
SkyLight = max((SkyLight * ambient_brightness) / 10.0, vec3(0.2,0.4,1.0) * (MIN_LIGHT_AMOUNT*0.01 + nightVision));
|
||||
}
|
||||
|
||||
vec3 DoDirectLighting(vec3 SunColor, float Shadow, float NdotL, float SubsurfaceScattering){
|
||||
|
||||
// vec3 SunLight = max(NdotL * Shadow, SubsurfaceScattering) * SunColor;
|
||||
|
Reference in New Issue
Block a user