Loving the new graphics 2.0 but for the life of me i cant manage to get multiple effects on a single object, is it a case of only 1 or is it possible?
Cant find any reference in the documentation either?
Loving the new graphics 2.0 but for the life of me i cant manage to get multiple effects on a single object, is it a case of only 1 or is it possible?
Cant find any reference in the documentation either?
AppThat - sounds like you may be asking about this:
http://coronalabs.com/blog/2013/10/17/tutorial-multi-pass-shaders-in-graphics-2-0/
But if not, just ignore my post. Someone else will help out soon
ah yep Thank you that was just the ticket, took a bit of fiddling to work it out but working perfectly!
This app is for some rather big brands too (one international)
Would love to hear about it when you are ready. Feel free to email me: david AT coronalabs
I had a quick play with this tonight too (nothing major, just combing the gaussian blur with saturate) and it works generally, but I seem to have found an instance where it partially fails. Here is my shader:
[lua]local kernel = {}
kernel.language = “glsl”
kernel.category = “filter”
kernel.name = “saturateGaussianBlur”
kernel.graph =
{
nodes = {
horizontal = { effect = “filter.blurHorizontal”, input1 = “paint1” },
vertical = { effect = “filter.blurVertical”, input1 = “horizontal” },
saturate = { effect = “filter.saturate”, input1 = “vertical” },
},
output = “saturate”,
}
return kernel[/lua]I have a snapshot and within that are several other snapshots with the filter applied.
It works when I do the following:
I change the filter settings.
I :invalidate() the overall snapshot
Lo and behold, the overall snapshot changes to reflect the filters. Great!
But, if I :invalidate() any of the inner snapshots, followed by :invalidate() the overall snapshot, I only see part of the filter effect - specifically the saturate still works, but I get no blurring. Any clue what might be going on?
I should also point out that the above custom filter, even when tweaked to only have 2 layers, causes a freeze on android, but I’m not unduly worried as I know the android build isn’t quite in the same place as the simulator and iOS builds.
[EDIT] Failed on mac build too. Is this feature not implemented in the builds yet?
Yeah i had some mixed results as well (Although no documentation yet so its deving in the dark a bit) its still early days i guess.
Looking into this - is there a sample project you could send? It seems the multipass filter is working, but there are some mixed results on snapshots only?
I’ll try to do a simple demo tonight but may not have time. If not, tomorrow for sure.
AppThat - sounds like you may be asking about this:
http://coronalabs.com/blog/2013/10/17/tutorial-multi-pass-shaders-in-graphics-2-0/
But if not, just ignore my post. Someone else will help out soon
ah yep Thank you that was just the ticket, took a bit of fiddling to work it out but working perfectly!
This app is for some rather big brands too (one international)
Would love to hear about it when you are ready. Feel free to email me: david AT coronalabs
I had a quick play with this tonight too (nothing major, just combing the gaussian blur with saturate) and it works generally, but I seem to have found an instance where it partially fails. Here is my shader:
[lua]local kernel = {}
kernel.language = “glsl”
kernel.category = “filter”
kernel.name = “saturateGaussianBlur”
kernel.graph =
{
nodes = {
horizontal = { effect = “filter.blurHorizontal”, input1 = “paint1” },
vertical = { effect = “filter.blurVertical”, input1 = “horizontal” },
saturate = { effect = “filter.saturate”, input1 = “vertical” },
},
output = “saturate”,
}
return kernel[/lua]I have a snapshot and within that are several other snapshots with the filter applied.
It works when I do the following:
I change the filter settings.
I :invalidate() the overall snapshot
Lo and behold, the overall snapshot changes to reflect the filters. Great!
But, if I :invalidate() any of the inner snapshots, followed by :invalidate() the overall snapshot, I only see part of the filter effect - specifically the saturate still works, but I get no blurring. Any clue what might be going on?
I should also point out that the above custom filter, even when tweaked to only have 2 layers, causes a freeze on android, but I’m not unduly worried as I know the android build isn’t quite in the same place as the simulator and iOS builds.
[EDIT] Failed on mac build too. Is this feature not implemented in the builds yet?
Yeah i had some mixed results as well (Although no documentation yet so its deving in the dark a bit) its still early days i guess.
Looking into this - is there a sample project you could send? It seems the multipass filter is working, but there are some mixed results on snapshots only?
I’ll try to do a simple demo tonight but may not have time. If not, tomorrow for sure.