playcanvas / playcanvas/engine
Transparent objects aren't visible behind dynamic refraction
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
When an object with dynamic refraction covers another transparent object, the object behind disappears. It's my understanding that this is because refraction is done in a single grabpass, instead of once per object. While this works for simple objects, it's a serious limitation for scenes with more than one refractive object (or other transparent objects).
A real-world example is this shower panel, where we can't currently use refraction & attenuation, even though we want to.
Test project: https://playcanvas.com/project/1460696
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 by reproducing the issue in the linked PlayCanvas test project, focusing on scenes with multiple transparent or dynamically refractive objects. Trace the dynamic refraction grabpass behavior and determine how the disappearing object can remain visible. Done means overlapping transparent and refractive objects render correctly without losing the object behind them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100