Multi pass shaders: cannot get them to work

Hi Guys I am testing multi pass shaders without much luck.  I am following to the letter the tutorial as per this link:

https://coronalabs.com/blog/2013/10/17/tutorial-multi-pass-shaders-in-graphics-2-0/

I get an error message, originating from my main.lua that states:

File: attempt to index a boolean value

Attempt to index a boolean value

stack traceback:

    [C]: ?

    [C]: in function ‘defineEffect’

    …ments/Corona Dev/Tests/Graphics 2.0/Filters/main.lua:2: in main chunk

There seem to be something wrong in when I call graphics.defineEffect in my main:

MAIN

local effect = require( "cartoonize" ) graphics.defineEffect(effect)

CARTOONIZE.LUA

local kernel = {} kernel.language = "glsl" kernel.category = "filter" kernel.name = "cartoonize" kernel.graph = { nodes = { horizontal = { effect="filter.blurHorizontal", input1="paint1" }, vertical = { effect="filter.blurVertical", input1="horizontal" }, }, output = "vertical", }

Hi Paolo,

This is very odd, since your code appears to be OK. Can you run (test) the sample project that uses multi-pass shaders? If this gives the same result, then something is really odd.

CoronaSDK > SampleCode > Graphics-Premium > FilterGraphDemo

Thanks,

Brent

Brent, I am so used to write “M = {} […] return M” that I have forgotten to write “return kernel”.  Do I get the “dumb of the week prize”?

May I ask you also if it is possible to take objects as input for composite filters or only files?  If would be quite useful in a situation where the picture to apply the effect to is user defined.

Hi Paolo,

This is very odd, since your code appears to be OK. Can you run (test) the sample project that uses multi-pass shaders? If this gives the same result, then something is really odd.

CoronaSDK > SampleCode > Graphics-Premium > FilterGraphDemo

Thanks,

Brent

Brent, I am so used to write “M = {} […] return M” that I have forgotten to write “return kernel”.  Do I get the “dumb of the week prize”?

May I ask you also if it is possible to take objects as input for composite filters or only files?  If would be quite useful in a situation where the picture to apply the effect to is user defined.

(put) return kernel (at end of the file)

(put) return kernel (at end of the file)