google / google/filament

The render effect(transparent aspect) is inconsistent on iOS and Android

Open
#6,519 4 comments 0 reactions 1 assignee Claimed by @bejado View on GitHub
metal
Dominant language
C++
Stars
20.5k
Forks
2.3k
Avg merge
2d 14h
Merged PRs (30d)
83

Description

Describe the bug
When iOS and Android are rendering the same 3D car model(the rendering parameters are also set the same as each other, through the filament framework), all the glass o on iOS is entirely opaque, but the glass on Android is transparent. The effect is as follows,could you please tell me how to make my glass on ios transparent? Thanks.

The effect is as follows,the first image is iOS,the second image is Android.
Pasted Graphic 6
Pasted Graphic 5

Reproduction the problem, parameters as follows
`
RenderQuality renderQual = _view->getRenderQuality();
renderQual.hdrColorBuffer = QualityLevel::MEDIUM;
_view->setRenderQuality(renderQual);

// dynamic resolution often helps a lot
DynamicResolutionOptions dynamicResolutionOp = _view->getDynamicResolutionOptions();
dynamicResolutionOp.enabled = false;
dynamicResolutionOp.quality = QualityLevel::MEDIUM;
_view->setDynamicResolutionOptions(dynamicResolutionOp);

// MSAA is needed with dynamic resolution MEDIUM
MultiSampleAntiAliasingOptions multiSampleAntiAliasingOp = _view->getMultiSampleAntiAliasingOptions();
multiSampleAntiAliasingOp.enabled = true;
multiSampleAntiAliasingOp.sampleCount = 4;
_view->setMultiSampleAntiAliasingOptions(multiSampleAntiAliasingOp);

// FXAA is pretty cheap and helps a lot
_view->setAntiAliasing(AntiAliasing::FXAA);

TemporalAntiAliasingOptions temporalAntiAliasingOp = _view->getTemporalAntiAliasingOptions();
temporalAntiAliasingOp.enabled = false;
_view->setTemporalAntiAliasingOptions(temporalAntiAliasingOp);

// ambient occlusion is the cheapest effect that adds a lot of quality
AmbientOcclusionOptions ambientOcclusionOp = _view->getAmbientOcclusionOptions();
ambientOcclusionOp.enabled = false;
_view->setAmbientOcclusionOptions(ambientOcclusionOp);

// bloom is pretty expensive but adds a fair amount of realism
BloomOptions bloomOp = _view->getBloomOptions();
bloomOp.enabled = true;
_view->setBloomOptions(bloomOp);

GuardBandOptions guardBandOp = _view->getGuardBandOptions();
guardBandOp.enabled = false;
_view->setGuardBandOptions(guardBandOp);

_view->setBlendMode(BlendMode::OPAQUE);`

Expected behavior
On iOS, the glass is translucent also, the same as on Android, all the time

Device and OS
iPhone12 iOS14, Xiaomi 11 Android 12

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.