[Bug] PostProcessEffects do not have MSAA (WebGL)
Nobody has claimed this yet.
- 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.
_resizeRenderBufferscreates a freshTexturewith nosamplesprop, resulting to a single-sampled texture.renderLayersswaps theoutputBuffertorenderBuffers[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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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