Skip to content

Paintings fixed math#36

Open
AngelTomkins wants to merge 6 commits intoHydr8gon:ndsfrom
AngelTomkins:paintings_fixed_math
Open

Paintings fixed math#36
AngelTomkins wants to merge 6 commits intoHydr8gon:ndsfrom
AngelTomkins:paintings_fixed_math

Conversation

@AngelTomkins
Copy link
Copy Markdown

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
Copy Markdown
Author

This PR now preserves the build for non TARGET_NDS devices

@AngelTomkins
Copy link
Copy Markdown
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.

1 participant