Skip to content
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

Shaders: Remove special handling for liquids. #4670

Merged
merged 1 commit into from Oct 26, 2016
Merged

Shaders: Remove special handling for liquids. #4670

merged 1 commit into from Oct 26, 2016

Conversation

lhofhansl
Copy link
Contributor

I do have another small, tactical change...

I was experimenting making water less transparent in the distance, when I realized the entire code is weird.
Currently we make water more transparent in the distance. At the max distance it is 100% transparent (presumably so that it is no longer visible). That's a hack, IMHO.

Instead we should just subject the water to the regular fog calculation, not only is the code slightly simpler, it also makes the water look more real.

Screenshots...

With patch:
screenshot_20161025_212440

Without (note how the water is more transparent in the distance):
screenshot_20161025_212400

Have a look.

@sofar
Copy link
Contributor

sofar commented Oct 26, 2016

Can we make water more foggy, as well?

@sofar
Copy link
Contributor

sofar commented Oct 26, 2016

Also, underwater screenshots please.

@lhofhansl
Copy link
Contributor Author

Underwater...

With:
screenshot_20161025_213404

Without:
screenshot_20161025_213445

Making water more foggy is an interesting idea, it would require pulling back the special handling.

@sofar
Copy link
Contributor

sofar commented Oct 26, 2016

I didn't compare with before, but the underwater experience after this patch looks great as well.

@lhofhansl
Copy link
Contributor Author

lhofhansl commented Oct 26, 2016

For more foggy water, we could either increase the range of the fog from 60% to (say) 80% so that over water fog would set in earlier, or we could shorten the range over water, so that the water surface would disappear in the fog earlier (or both). The would be quite a different patch.

@lhofhansl
Copy link
Contributor Author

Tried a quick change with more foggy water. Doesn't quite work, since then the water and the underwater "land" have different fog ranges. We would then have to detect land that is underwater and also shorten its fog range.

@sofar
Copy link
Contributor

sofar commented Oct 26, 2016

No worries, this is already a good step forward I feel.

@sofar
Copy link
Contributor

sofar commented Oct 26, 2016

FYI this looks great at dusk/dawn as well.

@sofar
Copy link
Contributor

sofar commented Oct 26, 2016

👍

@lhofhansl
Copy link
Contributor Author

Will look at something like this later: http://www.cescg.org/CESCG-2004/web/Zdrojewska-Dorota/
(none-uniform fog)

@paramat
Copy link
Contributor

paramat commented Oct 26, 2016

👍

@Fixer-007
Copy link
Contributor

will be nice to have much shorter view range in water

@est31
Copy link
Contributor

est31 commented Oct 26, 2016

👍

@est31 est31 merged commit 198ed60 into minetest:master Oct 26, 2016
@nerzhul nerzhul added this to the 0.4.15 milestone Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants