playcanvas / playcanvas/engine

Transparent objects aren't visible behind dynamic refraction

Open
#8,418 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area: graphics enhancement
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).

Image

A real-world example is this shower panel, where we can't currently use refraction & attenuation, even though we want to.

Image

Test project: https://playcanvas.com/project/1460696

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.