KhronosGroup / KhronosGroup/glTF-Sample-Viewer

Feature request: Add support for self masking of semi-transparent materials.

Open
#631 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
1.5k
Forks
264
Avg merge
5h 49m
Merged PRs (30d)
1

Description

I have a fish model, with some parts of its texture being transparent:

Image

The problem is, when these faces are put in front of other faces from the same object, the transparent part hides them instead of displaying over it:

Image

This makes it impossible to look through the transparent part. This problem does not seem to happen when rendering the transparent faces over faces of a different object, but I can't just manually separate every single element into multiple objects because these models are automatically exported and there's 160 of them.

The model I used: [Sardine.zip](https://github.com/user-attachments/files/23690197/Sardine.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue in the glTF-Sample-Viewer using the attached Sardine.zip model, then trace the rendering path responsible for transparent materials. Done means semi-transparent faces from the same object no longer hide faces behind them, while the existing behavior for separate objects remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.