Skip to content

fix: disable blending when generating SOG centers into an integer render target - #9224

Merged
mvaligursky merged 2 commits into
playcanvas:mainfrom
slimbuck:blend-err
Aug 25, 2026
Merged

fix: disable blending when generating SOG centers into an integer render target#9224
mvaligursky merged 2 commits into
playcanvas:mainfrom
slimbuck:blend-err

Conversation

@slimbuck

Copy link
Copy Markdown
Member

Problem

On WebGPU, picking a SOG scene (e.g. double-clicking in SuperSplat Viewer) produces Dawn validation errors and a broken pick:

Blending is enabled but color format (TextureFormat::RGBA32Uint) is not blendable.
 - While validating targets[0] framebuffer output.
 - While encoding [RenderPassEncoder "SogGenerateCenters-PassEncoder RT:sogCentersTexture"].SetPipeline(...)

GSplatSogData.generateCenters() lazily renders splat centers into an RGBA32U texture via RenderPassQuad. Since #8535, RenderPassQuad deliberately preserves the device blend state (callers own it), so the pass inherits the alpha blending left over from splat rendering. WebGPU rejects blending on integer formats, the pipeline is invalid, the pass silently no-ops, and the subsequent centers readback returns garbage — so picking on SOG scenes under WebGPU fails entirely. WebGL ignores blend state on integer targets, which is why only WebGPU surfaces this.

Fix

Set BlendState.NOBLEND on the device before rendering the quad, matching the caller contract established in #8535 and the pattern used by other drawQuadWithShader/RenderPassQuad callers.

@slimbuck
slimbuck requested a balanced review from Copilot August 25, 2026 14:08
@slimbuck slimbuck self-assigned this Aug 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ensures SOG center generation works on WebGPU integer render targets.

Changes:

  • Disables blending before rendering centers into the RGBA32U texture.
  • Documents the RenderPassQuad blend-state requirement.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/scene/gsplat/gsplat-sog-data.js Outdated
Addresses review feedback: RenderPassShaderQuad manages all draw states
declaratively (blendState defaults to NOBLEND), so the explicit blend
call is no longer needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mvaligursky
mvaligursky merged commit 5c65c47 into playcanvas:main Aug 25, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants