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

Paintings fixed math #36

Open
wants to merge 6 commits into
base: nds
Choose a base branch
from

Conversation

AngelTomkins
Copy link

Vertex displacement math is very slow, it currently uses floating point math. Per vertex it runs 16 floating point operations. (including a square root) This implementation only affects the graphical rendering of paintings and "floor paintings" like HMC and CotMC.

This PR converts all the values of the painting used in the vertex displacement math once per frame and operates on them all. This change makes the frame rate in HMC's room in the basement stay below 33 ms frame time. Thus staying at 30 fps. This affects the wobble effect when bonking or jumping into paintings too.

This change does not preserve the build for non DSi targets.

@AngelTomkins
Copy link
Author

This PR now preserves the build for non TARGET_NDS devices

@AngelTomkins
Copy link
Author

The graphics looks identical to me everywhere except for in HMC entrance, the centre of the "wobble" is slightly offset, and I'm not sure why. I will keep looking into this.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant