Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Alpha overlap - Gideros Forum

Alpha overlap

I need to achieve this effect:


Two objects is overlapping on a layer that has alpha < 1, and the intersection part is twice darker then the original. Is there a way to fix it? I tried to apply "setBlendMode" to the layer with all combinations of src and dst modes, but no result.

Problem representasion:
application:setBackgroundColor(0x323232)
 
local layer = Sprite.new()
stage:addChild(layer)
 
local shadow1 = Pixel.new(0, 1, 300, 50)
shadow1:setPosition(100, 225)
layer:addChild(shadow1)
 
local shadow2 = Pixel.new(0, 1, 50, 300)
shadow2:setPosition(225, 100)
layer:addChild(shadow2)
 
layer:setAlpha(0.3)

Comments

Sign In or Register to comment.