Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
transparency broken ? #142
Using scenejs 2.0. After many tries to move “transparent:true”, I don’t understand how to manage the it
Attached a simple test using 2 boxes and a ground, the sequence of rendering is box1, ground, box2. The alpha ground is 0.5, I should see a kind of reflection of box1 under the ground. But what’s ever the order of the objects and the ground alpha factor, I can’t see the box under the ground. This code works with scenejs 0.8
any change in 2.0 ? Any tips ? or ideas ?
var _Scene=/open First brace/
myscene = SceneJS.createScene(_Scene);
Thanks for your prompt answer; I am completely stuck due to this issue
Yes, I have put a “flags” in different places in order to observe the behaviors ( top of node, before the transformation, in the library )
I have one flags node on top of the scnegraph, this is supposed to affect all childs nodes
Could you post the example to http://jsfiddle.net?
Looks like we'll have to play with it live to see what's going on..
In this example you have no opaque objects, so it's possible that transparency is broken for when there are only transparent objects, we'll see.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Hey all -- just chiming in to say that I believe transparency is indeed broken when there are only transparent objects.
Here's the 2.0 example Transparency Sorting with Layers, with an additional flags node added around the opaque cube.
With the transparent flag false on this node, the outer cubes are still transparent:
With the transparent flag set to true, all cubes are now opaque.
Here's a diff of the GL logs from a similar local example. The only difference appears to be the position of the gl.enable(gl.BLEND) and gl.blendFunc() calls, which move from line 163 to 215 when you change transparent: true back to transparent: false on the opaque cube node.