custommods

This commit is contained in:
samsonsin
2025-05-29 23:31:29 +02:00
parent 90b3575aea
commit 9d577eb52d
800 changed files with 19540 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
vec3 SunGlare(vec3 color, vec3 nViewPos, vec3 lightCol) {
float cosSp = dot(nViewPos, lightVec);
if (cosSp > 0.0) {
float cosS = cosSp;
cosS *= cosS;
cosS *= cosS;
cosS *= cosS;
float visfactor = 0.075;
float sunGlare = cosS;
sunGlare = visfactor / (1.0 - (1.0 - visfactor) * sunGlare) - visfactor;
sunGlare *= cosSp;
sunGlare *= 0.25 * SUN_GLARE_STRENGTH * (1.0 - rainStrengthS);
float shadowTime = abs(sunVisibility - 0.5) * 2.0;
shadowTime *= shadowTime;
sunGlare *= shadowTime * shadowTime;
vec3 finalSunGlare = lightCol * sunGlare;
if (isEyeInWater == 1) finalSunGlare *= underwaterColor.rgb * underwaterColor.rgb * 200.0;
color += finalSunGlare;
}
return color;
}