But when I use display effect on the same canvas, the canvas blending does not work.
I use something like this in the canvas:
- Code: Select all
svg.holeMask = svg.p_HSD.createChild("image")
.setTranslation(0,0)
.set("z-index",10000)
.set("blend-source","zero")
.set("blend-destination-rgb","one")
.set("blend-destination-alpha","one-minus-src-alpha")
.set("src", "sit-mask.png");
The png is just a white texture, with some areas being transparent. The white areas will hide what have a lower z-index in the same group.
I have looked and experimented with the effect for display and I cannot find what should cause this.
As seen from the fragment shader, the canvas should just be a Texture2D lookup, so I don't get how the effect can mess with the internal canvas blending. Especially since the other effect does not do it.
Note: Posted this also to mailing-list, but got no reply yet.