Hi there,
When using the “filter.invert” in a png file, its alpha channel is setted to 1. I’m trying to create a multi-pass shader combining “filter.invert” and “filter.chromaKey” [in order to erase the filled “alpha” channel] like this:
local kernel = {} kernel.name = "invertWithAlpha" kernel.language = "glsl" kernel.category = "filter" kernel.graph = { nodes = { horizontal = { effect = "filter.invert", input1 = "paint1" }, vertical = { effect = "filter.chromaKey", input1 = "horizontal" }, }, output = "horizontal", } graphics.defineEffect(kernel)
But when using it…
object.fill.effect = "filter.invertWithAlpha" object.fill.effect.vertical.color = { 1, 1, 1, 1 }
… displays an error: Attempt to index field ‘vertical’ (a nil value)
What am I missing?