X Tutup
Skip to content

Fix star background generation#5758

Merged
sturnclaw merged 3 commits intopioneerspacesim:masterfrom
Gliese852:holes-in-space
Feb 15, 2024
Merged

Fix star background generation#5758
sturnclaw merged 3 commits intopioneerspacesim:masterfrom
Gliese852:holes-in-space

Conversation

@Gliese852
Copy link
Contributor

@Gliese852 Gliese852 commented Feb 10, 2024

  • really do early out

  • rotate coordinate system from galaxy (Z-up) to scene (Y-up)

  • more fairly distribute the number of stars among tasks - these are spherical segments

  • do not overlap task ranges

  • calculate the average of the median brightnesses, and use the same value in all pieces

Fixes #5414

Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! The code overall looks good, hopefully the TaskGraph / TaskSet API wasn't too difficult to understand. I've left one comment where I think an operation should be moved to a different point in the lifetime of the Background class.

Will give this a test in the next few days.

Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

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

Test looks good. If interested in doing further work in this area in another PR, now that starfield generation is multithreaded the SystemMapViewport could own its own Background instance and rebuild the background when the currently viewed system changes (currently stars are only drawn in the map background if viewing the current system in the game, and never in the editor because of this).

We want matrix4x4 to remain column-major, at least so that we can pass
its data to OpenGL functions without problems and confusion.

On the other hand, when explicitly specifying a matrix in the program
code, I would like to be able to write it by row.
  - really do early out

  - rotate coordinate system from galaxy to scene

  - more fairly distribute the number of stars among tasks

  - do not overlap task ranges

  - calculate the average of the median brightnesses, and use the same
    value in all pieces
@Gliese852
Copy link
Contributor Author

Forced fixup commit, had to rebase to a fresh master because there was a conflict.

@sturnclaw sturnclaw merged commit 60f643c into pioneerspacesim:master Feb 15, 2024
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.

Irregular display of stars in the sky

2 participants

X Tutup