fix(gsplat): align projector projection with WebGPU shader uniforms#8662
Merged
Conversation
Apply the same flip-Y and WebGPU clip-depth projection transform as matrix_projection so hybrid raster depth matches opaque geometry. Centralize transforms on Camera; pass flipY into hybrid projector; remove throttled matrix debug logs.
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.
Hybrid and compute-local GSplat paths now build
viewProjand related uniforms from the same projection transform the forward renderer uploads asmatrix_projection(render-target flip-Y when applicable, then WebGPU clip depth range). That fixes incorrect depth against opaque meshes on WebGPU when those flags differ from rawCamera#projectionMatrix.Changes:
Camera.applyShaderProjectionTransformplus internal static matrices and a shared scratch matrix for the combined flip-Y + WebGPU case.Renderer#setCameraUniformsdelegates projection adjustment toCamera.GSplatProjector#dispatchandGSplatComputeLocalRendereruse the helper; hybrid manager passesflipYfrom the camera render target.GSplatHybridRenderer_computeClipToViewZinverts the same shader-style projection as the hybrid vertex path.[GSplat raster-cpu-sort]/[GSplat hybrid-projector]matrix debug logs.The
Cameraclass remains@ignorefor generated docs; this is primarily an internal engine consistency fix.