-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add horizon fadeout for fog effects #25
base: main
Are you sure you want to change the base?
Conversation
prevents bizzare fog glow when looking off of high places past the draw distance
shaders/clouds.omwfx
Outdated
col = apply_fog(col, wpos, dir, max_dist, dyn_clouds, dyn_mist); | ||
} else if (dir.z > 0){ | ||
float fogFadeIn = clamp(dir.z * 5.0, 0, 1); | ||
col = apply_fog(col, wpos, dir, max_dist, dyn_clouds, dyn_mist) * fogFadeIn + (col * (1-fogFadeIn)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think this would be clearer as
col = mix(col, apply_fog(...), fogFadeIn);
Seems reasonable! Just one comment. |
Thanks for reviewing so quick, but it looks like this logic breaks down on the coastlines, so let me work on it more. |
Ok, try out this version. I ended up redoing the algorithm, but I think that this version works way better. |
Thanks. Any chance you have a screenshot showing a before/after? I'm unfortunately not in a position to check the code in-game right now. |
Prevents bizarre fog glow when looking off of high places past the draw distance.
(also moved some lines over a tab, which I assume wasn't intended to be double tabbed)