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:
[lua]
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
[/lua]
and here’s the code where i use it.
[lua]
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
[/lua]
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?