Detail grass instancing mt#577
Open
samloeschen wants to merge 8 commits into
Open
Conversation
…ets moved to VS as a result). compress instances to 64b, and sort by depth
Brings the grass rendering optimizations into the MT branch: - DX10/11 hardware instancing for details (single-copy VB/IB + per-instance vertex stream, 64B packed records, one DrawIndexedInstanced per detail object) - fill-once-per-frame instance buffer reused by sun cascade / spot light shadow phases (no refill, alpha smoothing once per frame) - distance fade moved to the vertex shader (dt_fade_params) - draws grouped by ShaderElement, front-to-back slot sorting - distance-based density falloff (r__detail_density_knee/_curve) MT-side adaptations made during conflict resolution: - instance records read mRotY_calculated (scale pre-multiplied in UpdateVisibleM on the MT worker) instead of the removed scale_calculated member - hw_Render/hw_Render_dump keep the light* L parameter; sector visibility culls (GMBase / L->GMLight vs pOutdoorSector) hoisted to per-dump early-outs since they are instance-independent; still details (var 0) keep skipping SMAP phases - upstream per-instance light-range cull dropped: out-of-range blades collapse to degenerate tris in the VS light fade instead - density falloff coexists with the upstream SSA-fade blade discard - fixed a missing-brace bug in hw_Render_dump's empty-variant early-out (the committed grass branch tip did not compile; fix was only in a stash) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…etail-grass-instancing-mt
Author
|
corrected shaders: I missed a typo Claude inserted when I was doing the dx10 stuff 🤦♂️ |
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.
MT version of the grass optimizations branch. See this PR
required mod for grass shaders:
grass shaders.zip