Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Why does the glow disappear?
Started by horacebury Feb 27 2015 01:37 AM

No replies to this topic
filters gfx2 bloom snapshot
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

horacebury

[GLOBAL: userInfoPane.html]
horacebury
  • Corona Geek

  • 3,073 posts
  • Corona SDK

Why does the glow around the circle disappear?

local circle = display.newCircle( 0, 0, 50 )
circle.fill = {1,0,0}

local snapshot = display.newSnapshot( 200, 200 )
snapshot.group:insert( circle )
snapshot.x, snapshot.y = 200, 200

snapshot.fill.effect = "filter.bloom"
snapshot.fill.effect.levels.white = 0.8
snapshot.fill.effect.levels.black = 0.4
snapshot.fill.effect.levels.gamma = 1
snapshot.fill.effect.add.alpha = 0.8
snapshot.fill.effect.blur.horizontal.blurSize = 20
snapshot.fill.effect.blur.horizontal.sigma = 140
snapshot.fill.effect.blur.vertical.blurSize = 20
snapshot.fill.effect.blur.vertical.sigma = 140

timer.performWithDelay( 500, function()
	snapshot:invalidate()
end, 1 )

I know I could apply the effect directly, but this is part of a larger piece and I just need to understand what invalidate is doing to the effect and how to update the glow (to be combined with others, later.)




[topic_controls]
[/topic_controls]