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

[NOSQUASH] Remove trigonometry from liquid drawing #13599

Merged
merged 2 commits into from Jun 22, 2023

Conversation

numberZero
Copy link
Contributor

Fix #13217
Replaces atan2+rotateBy combo with matrix multiplication (inlined, since Irrlicht lacks 2×2 matrix type apparently).
Also, some cleanup in nearby code to ensure exact values are exact (avoiding *BS/BS).

To do

This PR is Ready for Review.

How to test

Look at flowing liquid. Compare with current master. Pay attention to symmetrical cases (e.g. a flowing liquid node surrounded with sources at all 4 sides).

Copy link
Member

@Desour Desour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works.
And code is also fine otherwise.

src/client/content_mapblock.cpp Show resolved Hide resolved
Copy link
Member

@Desour Desour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks identical, hence OK.

grafik

@sfan5 sfan5 merged commit c29d897 into minetest:master Jun 22, 2023
13 checks passed
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.

[Task] Optimize trigonometry out of MapblockMeshGenerator::drawLiquidTop
5 participants