Fix star background generation#5758
Conversation
sturnclaw
left a comment
There was a problem hiding this comment.
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.
sturnclaw
left a comment
There was a problem hiding this comment.
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
0b99e6c to
eada00c
Compare
|
Forced fixup commit, had to rebase to a fresh master because there was a conflict. |
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