visgl / visgl/deck.gl

[Bug] PostProcessEffects do not have MSAA (WebGL)

Open
#10,404 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

PostProcessEffects receive no MSAA because the FBO they receive is single-sampled. This happens in DeckRenderer.renderLayers and DeckRenderer._resizeRenderBuffers.

  1. _resizeRenderBuffers creates a fresh Texture with no samples prop, resulting to a single-sampled texture.
  2. renderLayers swaps the outputBuffer to renderBuffers[0] (single-sampled) and passes it to the effect.

I believe a proper fix is blocked by https://github.com/visgl/luma.gl/issues/2702 – it seems luma.gl isn't respecting the samples property for Texture currently.

It may be desirable to keep MSAA off for PostProcessEffects for performance, if that's the case I feel like it should at least be documented as a limitation.

Thanks for taking a look!

Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CARTO
  • ArcGIS
Expected Behavior

Using a PostProcessEffect preserves MSAA.

Steps to Reproduce

You can see this in the docs codepen for PostProcessEffect. Simply taking it off brings back MSAA.

https://github.com/user-attachments/assets/e3f2b848-1beb-4c25-8ef6-4745f6ee97c8

Environment
  • Framework version: 9.3.1
  • Browser: Chrome Version 149.0.7827.199 (Official Build) (arm64)
  • OS: macOS 15.5 (24F74)
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in modules/core/src/lib/deck-renderer.ts, especially DeckRenderer.renderLayers and _resizeRenderBuffers, then review luma.gl issue 2702. Reproduce the behavior with the PostProcessEffect docs CodePen and determine whether the outcome should preserve MSAA or document the limitation. Done means the chosen behavior is verified against the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.