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

Rendering Improvements, Fixes + Occlusion Culling #204

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

AzureAaron
Copy link
Collaborator

Occlusion Culling

  • Implemented an occlusion culling system
    • With Frustum Culling, objects that are in the camera's FOV won't be culled even if they're blocked by walls or other surfaces while with occlusion culling, if the view to an object is blocked then it is culled.
    • The implementation first checks if the bounding box is within the frustum, if its not then the function short-circuits to avoid unnecessary path tracing. If it is within the frustum then the rest of the occlusion culling logic is executed.
  • Uses the Occlusion Culling library made by Logistics Craft

Rendering Fixes/Changes

  • All RenderHelper methods now use some kind culling
    • The renderFilledIfVisible method now uses occlusion culling
      • Fixes being able to see the mirrorverse waypoints from the edge of the Stillgore Château
    • The rest of the methods now use frustum culling since they render things through walls (thus being able to be seen as long as they're in the camera's FOV)
  • The beacon beams are now rendered directly after their vertices have been written to the buffer
    • Fixes an issue where they could render incorrectly (e.g. flickering, weird rotations)
    • Also simplified the logic in the method to be more readable
  • The beacon beams now render at a maximum height of 319 to match the world build height limit
    • Prevents a weird discolouration issue with them at higher Y levels
  • Made some RenderHelper methods private so that culling checks aren't accidentally skipped
  • The pointExistsInArea method now uses the unboxed version of boolean

kevinthegreat1
kevinthegreat1 previously approved these changes Jul 16, 2023
build.gradle Show resolved Hide resolved
@kevinthegreat1 kevinthegreat1 merged commit e76af72 into SkyblockerMod:master Jul 17, 2023
@AzureAaron AzureAaron deleted the occlusion-culling branch July 18, 2023 18:29
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.

2 participants