Hello. This is my first time trying to implement two shaders to an object. All I want to do is apply the blur filter and the brightness filter.
I followed the tutorial here:
http://www.sdknews.com/cross-platform/corona/tutorial-multi-pass-shaders-in-graphics-2-0
Code from main.lua
local effect = require( “kernel_filter_myGlow” )
graphics.defineEffect( effect )
Code from kernel_filter_myGlow.lua
local kernel = {}
kernel.language = “glsl”
kernel.category = “filter”
kernel.name = “myGlow”
kernel.graph =
{
nodes = {
blurPass = { effect=“filter.blur”, input1=“paint1” },
brightnessPass = { effect=“filter.brightness”, input1=“blurPass” },
},
output = “brightnessPass”,
}
return kernel
Code from level.lua (where the image is displayed)
coinGlow[i] = display.newSprite( foregroundGroup, coinSheet, coinSequenceData )
coinGlow[i]:play()
coinGlow[i].fill.effect = “filter.myGlow”
The object is a sprite, but I’ve tested the effect on a png with no animation.
I get this error: “ERROR: Could not find or load shader (filter.myGlow).”
I don’t think the error is in the main.lua code. Please help.
BTW, I don’t know enough to understand Corona’s Custom Shader Effects guide here:
https://docs.coronalabs.com/guide/graphics/customEffects.html