简体   繁体   中英

SceneKit, how to support opacity (or transparency) map properly for geometry on the back?

As the image below, it's a cube with opacity map. We can see the front 3 faces rendered correctly with transparency. But the back 3 faces totally disappeared. Logically, we shall see something from the back faces.

So, what is the correct steps to support transparency and fix this problem?

在此处输入图像描述

hmmm... doubleSided? By default, scenekit doesn't render front and back. Since the back panels on the cube are facing away from you, they aren't being rendered.

Should be something like:

plane.firstMaterial?.isDoubleSided = true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM