Posts

Post not yet marked as solved
2 Replies
This is what scares me the most. 26 views, 0 replies... One of very few fundamentals of 3d rendering - semi-transparent materials (triangles) and nobody knows how to achieve it in SceneKit when Custom Shaders are used.Here's very nice and extensive explanation of things related the topichttps://stackoverflow.com/questions/44999255/scenekit-diffuse-alpha-vs-transparency-transparent?answertab=active#tab-topbut it didn't help me that much. Premultiplied alpha is probably optimisation thing, yet very unintuitive.When I use build-in SCNMaterial and set transparency, it all works. So it has to be possible to achieve transparency even in custom shaders. Unity, Unreal Engine, OpenGL and even low level metal shader rendering techniques can simply returnvec4(1, 0, 0, 0.2) in fragment shader to see semi-transparent red plane in the scene.SceneKit is different though. They use some magic and optimisations to achieve great FPS, but made it very unfriendly, complicated and complex. There's no proper documentation..This is very painful experience.. I wouldn't believe how difficult is to render one plane with 2 triangles and hope for transparency...