Skip to content

Conversation

@Birdy2014
Copy link
Collaborator

@Birdy2014 Birdy2014 commented Aug 19, 2025

So I'm procrastinating learning for exams again and decided to finally improve the performance of this program.

With this PR, instead of rendering only one diffuse and opacity texture per mesh, up to 16 can be drawn. This allows more meshes to be merged per node and reduces the amount of meshes from 4980 to 1356 for the city model. The per-core CPU load is reduced from 160% to 100% on my machine.

There is one drawback: Indexing an array using a vertex attribute may not be legal in GLSL (but it works for me), so I would need to replace that with some ugly loop if it doesn't work for you.

So, please test this PR on Windows and MacOS, but since this project is long over, this PR will probably stay open forever.

@pixelsandpointers
Copy link
Owner

@Birdy2014 can check tomorrow.

@LazyBone2017
Copy link
Collaborator

Tested on Windows:
slight decrease in max CPU-usage ~30%
however GPU-usage increased by 50%

@Birdy2014 Birdy2014 marked this pull request as draft August 23, 2025 22:42
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.

4 participants