Add optional depth prepass and explicit SRP splat rendering#37
Draft
andybak wants to merge 13 commits into
Draft
Add optional depth prepass and explicit SRP splat rendering#37andybak wants to merge 13 commits into
andybak wants to merge 13 commits into
Conversation
# Conflicts: # Runtime/GsplatRenderer.cs # Runtime/GsplatSorter.cs
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.
This PR adds an optional alpha-tested depth prepass for Gaussian splats. The prepass
allows opaque scene geometry and sufficiently opaque splat regions to participate in
depth compositing while retaining the normal transparent color pass.
A new
Depth Prepass Alpha Cutoffproject setting controls which splat fragmentswrite depth. Its default value is
1.1, which disables depth writes and preservesthe existing rendering behavior until the feature is explicitly enabled.
The change also moves URP color drawing into explicit renderer-feature passes. It
supports both the legacy command-buffer path and the Unity 6 Render Graph path.
HDRP's custom pass explicitly sorts and renders the color pass so HDRP rendering is
not suppressed by the SRP-specific draw path.
Main changes
GsplatSettings.DepthPrepassAlphaCutoffwith a project-settings field.CommandBufferand Unity 6RasterCommandBufferrendering.Behavior
1.0disables the depth prepass.Risk and compatibility
This PR touches the built-in, URP, and HDRP rendering paths and has the widest
rendering impact of the extracted branches. The default setting is intended to keep
depth writes disabled, but the explicit SRP color path is still a structural change.
This branch currently contains Unity-generated material and
.metalines withtrailing spaces. Those lines came from the original assets and may be normalized
separately if required by the upstream repository's formatting policy.
Suggested testing
0, a mid-range value,1, and the disableddefault of
1.1.