Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

multi effect issue on snapshots...
Started by punyroboto Oct 15 2014 08:37 PM

No replies to this topic
[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

punyroboto

[GLOBAL: userInfoPane.html]
punyroboto
  • Enthusiast

  • 96 posts
  • Corona SDK

hello!

so i'm trying to create a snapshot of the background for my game and to run two filter effects as a graph.

the problem i'm having is that only the last declared filter seems to run.

 

kernal file:

local kernal={}
kernal.language="glsl"
kernal.category="filter"
kernal.name="bgKernal"
kernal.graph=
{
    nodes={
        hue = {effect="filter.hue",input1="paint1"},
        vignette = {effect="filter.vignette",input1="hue"},
    },
    output="vignette",
}
return kernal

 

and here's the code where i use it.

sGroup=display.newSnapshot(screenW,screenH)
..
.. -- fill the snapshot's group with bg stuff
..
local effect=require("bgkernal")
graphics.defineEffect(effect)
sGroup.fill.effect="filter.bgKernal"
sGroup.fill.effect.hue.angle=200
sGroup.fill.effect.vignette.radius=0.5
 

 

only the vignette appears to be applied. this seems to happen no matter what i put in the filter effects.

and the last effect in the graph is the only one applied, no matter what the effect.

my snapshot does contain sub display groups, if that could be the issue.

anyone have any ideas?




[topic_controls]
[/topic_controls]