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

Minor optimisations and tweaks #6087

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

fluffyfreak
Copy link
Contributor

Optimisations parts:

  • Inlined methods and added a Normalise-in-place to vector3d
  • Batched generating heights, avoid calling GetHeight 1225 times and instead request all heights at once
  • Forced override of GetHeight in BaseSphere since it always is anyway
  • m_entropy[12] is only used in 2 places and only ever used the first value but refreshed it hundreds of times every Terrain Ctor

Tweak:

  • Display the Height and Color fractal names used for a terrain in ObjectViewerView (Ctrl+F10)

These changes probably do affect the terrain generation though I haven't noticed massive changes in testing. Unsure if we'll need a savegame bump

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.

1 participant