Open
Conversation
### SceneFBO Changes * SceneOpaqueDepth buffer switched from RenderBuffer to Texture2DMSAA * Format changed from 32F to 24 * SceneAlphaDepth added, format set to 16 since precision isn't needed for depth testing ### Depth Shader Program * DepthBias encoded into last 8 bits of the textureFaceIdx, to avoid needing to sample the texture buffer to resolve it * FastDepth is utilized without a fragment shader attached ### Zone Renderer * Clearing of the fboScene has been moved to its own pass * depthprePass added * Renders Opaque Depth to the sceneFBO * Renders Alpha Depth into a separate fbo for sampling only * zone & VAO are added into a new command buffer for drawing into opaque & alpha depth buffers separately optimised calculateTileMinMax Sampling corners & midpoints is sufficently accurate, which reduces depth taps from 16x16x2 to just 3x3x2 Optimised LightZ Vs MinMax by removing sqrt Also optimised distanceScore by using squared values instead of linear Sync Simplify tile depth check Moved Tile Depth check to be before all the cone culling checks we want 3x3x2 not 4x4x2
Disabled culling lights behind the camera, it will now be culled by the min/maxing Sync
Expanded Occlusion Queries to directional draw added isVisible Sync Sync Disable Occlusion Culling Direction Queries when Shadow Alpha enabled Added Debug Visualiser Support Sync Sync Dont spin wait, continue if its not available Queries need to be double buffered Sync Sync Sync Sync Buffer Samples to ensure minimal readback delay Directional Queries should sample scene depth FBO with the AABB expanded along the directional camera forward to see if the expanded AABB is visible Fixed Directional Shadow AABB Expanding Zones will now remove encapsulated AABBs Sync Dont getAABB when occlusion culling is disabled Sync Added BindBufferRange support to uniform buffer Sync Sync Sync Fix Flicker Always set worldView since the player can enter a boat & leave Switch to back face culling, otherwise we consider AABBs occluded whilst inside the AABB. Alternatively we could test if the camera is inside & skip those checks Skip occlusion queries if the camera is within any of its AABBs Debug Stuff Moved assert Fixed Dynamic Occlusion queries not resting their AABBs each frame AABB Fixes Fix World View projected AABBs Frustum Cull AABBs Sync Occlusion Query Frustum Culling Sync Formatting Frustum Cull Query AABBs to reduce needless rendering Fixes Sync Sync Sync Sync Added KeyBind to toggle between Static+Dynamic/Static/Dynamic
TODO: move sceneDepthFBo resolve out of occlusion so that tiledlighting min/max & scene shader can use it
Optimizations Optimizations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SceneFBO Changes
Depth Shader Program
Zone Renderer
Occlusion Culling
TileMinMax.mp4
Laptop GPU Bound Example (Base 921 PR Left, 942 PR Right)
