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

Graphics performance enhancement #53

Closed
uis246 opened this issue Nov 23, 2020 · 1 comment · Fixed by #78
Closed

Graphics performance enhancement #53

uis246 opened this issue Nov 23, 2020 · 1 comment · Fixed by #78

Comments

@uis246
Copy link
Contributor

uis246 commented Nov 23, 2020

  1. Stop rendering when window minimized
  2. Add simple section backfaces culling on CPU(store faces as 7 arrays of faces by their direction: up, down, east, north, west, south, none. "None" will not culled).This will avoid useless vertex shader and other pre-rasterization stages execution.
  3. Make post-processing optional and render to fbo. This will enable Pixel Ownership Test.
  4. Refactor world rendering. Split to opaque and transperent passes.
  5. Use static uniform location for projection matrix and day time
  6. Store chunk in single VBO

Also can be useful:

  1. Indirect texturing
  2. Store entire chunk in single vao for batching
  3. GLX_INTEL_swap_event with GLX_OML_sync_control. Useful when GPU is bottleneck
@LaG1924
Copy link
Owner

LaG1924 commented Dec 18, 2021

So, most of it should be fixed in #78. Other ones need to be discussed. Also, I will keep consistent numeration for more convenient sub-issues referencing.

  1. Is it really necessary? Windows already gives lower (or even lowest) priority for non-focused windows, so it uses fewer resources. And sometimes high framerate for minimized windows can be useful.
  2. I didn't get it. Do you mean something like Occlusion culling #20? Please better explain your algorithm.
  3. Pixel Ownership Test does not sound like something important, but anyway, this feature is implemented in a12779b
  4. Opaque/masked faces could be split but its performance effort is doubtful. Blended/non-blended faces (AFAIK, in MC1.12.2 only water does need blending) must be split into two passes.
  5. Fixed in c905ede
  6. It will decrease section (16x16x16 blocks) remeshing performance. We will need then spare space for removed/created new blocks.
  7. I cannot google directly "Indirect texturing". Did you mean Bindless Texture? Even if you don't, it (Bindless Textures) looks promising. Direct State Access sounds good too.
  8. As noted in 6., it will ruin remeshing performance and will make CPU-culling (or GPGPU) almost impossible. Right now bottleneck is (as states Nvidia's NSight) VAF (vertex attribute fetch). In other words, there are too many vertices to process (which ones will be z-culled later anyway, so why do we have to send them to draw?).
  9. Is it only Intel&Linux specific? If so, then better to find a more common subset of such functionality (if applicable, of course).

@LaG1924 LaG1924 linked a pull request Dec 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants