Skip to content

Conversation

@RuffledPlume
Copy link
Contributor

Reworked FacePriortySorter to build an indicie array which is passed into SceneUploader

Alpha Models now have the sorted faces uploaded first, then unsorted last to allow for drawElements & drawArrays to work, meaning shadow rendering can use the sorted model data

@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 5 times, most recently from f618fb6 to e2e93af Compare January 2, 2026 18:29
@RuffledPlume RuffledPlume changed the title Reduce Alpha Model Uploads FacePrioritySorter Optimizations Jan 2, 2026
@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 2 times, most recently from 52f5ea6 to 8ad7cf4 Compare January 3, 2026 02:05
@RuffledPlume
Copy link
Contributor Author

image image

@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 3 times, most recently from 6d9ef02 to 684533d Compare January 6, 2026 03:08
@RuffledPlume
Copy link
Contributor Author

Updated Timings in the same view as the above:
image

@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 6 times, most recently from cc62cec to c0220f9 Compare January 6, 2026 23:30
@RuffledPlume
Copy link
Contributor Author

Same view, even faster now:

image

@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 3 times, most recently from 2ad984a to 08d7189 Compare January 7, 2026 01:42
@RuffledPlume
Copy link
Contributor Author

Final test in the same view:
image

@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 2 times, most recently from 49f7767 to 7cea999 Compare January 7, 2026 04:48
@RuffledPlume
Copy link
Contributor Author

RuffledPlume commented Jan 7, 2026

Ok Ok, this time for real final perf improvement:
image

@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 3 times, most recently from b48fd2b to 74bb319 Compare January 7, 2026 13:53
@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 7 times, most recently from a9df200 to bd54d66 Compare January 12, 2026 01:06
@RuffledPlume
Copy link
Contributor Author

image image image

@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 11 times, most recently from b3b20de to ba50f24 Compare January 12, 2026 16:16
Reworked FacePriortySorter to build an indicie array which is passed into SceneUploader

Alpha Models now have the sorted faces uploaded first, then unsorted last to allow for drawElements & drawArrays to work, meaning shadow rendering can use the sorted model data

Tweaks

Use Stamp Check as a slow path vs fast path

Async Alpha Face Sorting

Sort Zones close accurately, then sort zones past the mid range with significantly less accuracy. Then dont sort at all for the furthest zones
Fix EnsureCapacity not growing enough to fit the count

Perform multizoneLocs in PreSceneDraw

multizoneLocs was failing due to zones being culled, causing flickering models when nearby zones we're culled. Instead of performing multizoneLocs in drawAlpha we should do it in preSceneDraw regardless of visibility, this allows us to do more accurate culling again saving allot of perf

multizoneLocs should find the closest visible zone & padd scene frustum check

Sync

Replace eboAlphaStaging with a MappedBuffer

We can reuse the results of the previous frame providing the Yaw/Pitch & Dist are the same

Clamp buckets based on the diameter

Offload StagingFaces copy to a job

Sync

Fix Plugin Reload

Job needs to ensure its completed before requeuing

Added vanillaTextureToOverrideCache

Tweaks

Reintroduced vaoShadow, now unsorted faces are pushed to vaoShadow & sorted are pushed to vaoO. This reduces the amount of faces pushed & potential breakage to sorting

Tweaks

Merge Projected X/Y & Dist

Perform Projection within the SceneUploader transformModelVertices to avoid looping over vertices multiple times

Merge modelLocalXYZ and modelLocalXYZI

fz check is redundant now since it should be caught by the projection

Optimizations

Added int version of undoVanillaShading

Optimizations

Tweaks

Tweaks

Added Timers (Draw_Temp, Draw_Dynamic)
Async Shadow Upload

Swap to ConcurrentLinkedDeque

ConcurrentLinkedDeque is lock free, so queuing jobs in hot path is faster

Fixed Material Data typo

Optimizations
Ignore Contexts which are still loading

Fixes

Ignore Draw Callback if WorldViewCtx is still loading

IndirectDraw Exception handelling

Fix Timers

Make Threaded Dynamic Upload just refresh GPU Flags instead of restarting plugin

Sync

Reduced VertexWriteCache Max Capacity from a MB to just 64 KB

Memory Usage Reduction

Only Allocate DynamicRenderThreads when the config is enabled

SceneUploader is small enough to not warrent pooling

Change SortedFaces to KB instead of MB

Sync

Dynamically resize distanceToFaces

Allocate enough to fit the diameter

Tweaks

Memory Reductions

Allocate distanceToFaces based on models diameter & faceCount

Increase Dynamic Upload RT To a max of 4, since i've reduced the memory usage

Sync

Sync

Sync

Sync

Sync

Added Thread safe alternative to NPC getId
@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch 5 times, most recently from 69fd2e7 to 0cd9213 Compare January 12, 2026 18:31
Buffer overflow fixes
synchronisation

Sync

Tweaks

Tweaks

Tweaks

AsyncShadowUpload
@RuffledPlume RuffledPlume force-pushed the SortedModelUploadRework branch from 06678a9 to 3781cab Compare January 12, 2026 19:47
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.

1 participant