Ported from C2 user TheBen:
Hi, I'm interest to your effect and I've just tested your effect with your .c3p test file but I have a problem.
the sprite doesn't appear at all into the editor as long as the effect is applied to the sprite:
if remove at least one effect I do start to see something:
if I run the project with both effects I don't see anything:
it appears it work if I use one effect at the time only.
Hope this help you.
rraffo Interesting - what platform are you running your test on? I see something similar on iOS.
I have an idea that it may have to do with using glsl function clamp with srcOriginStart and srcOriginEnd. When I stack effects, I think C3 may do interesting things with srcOriginStart and srcOriginEnd (like flip the Y axis or something, so I cannot rely srcOriginEnd.y to be bigger than srcOriginStart.y.) I observe this using Spector.js and my test project.
Ashley does that make sense - srcOriginStart.* will not always be less than srcOriginEnd.* depending on whether intermediate rendering is required to a different FB, because of effect stacking? So, I would not be able to use clamp(vTexNew,srcOriginStart, srcOriginEnd) instead to do a clamp on y for a texture sample address, I would need to use min(srcOriginStart.y, srcOriginEnd.y) and max(srcOriginStart.y, srcOriginEnd.y) and do separate compares to 'clamp' a texture sample to the edge of the image (original texture or texture used as FB?)
Hello Mikal, I did a quick test with an old Windows 7 PC.
Actually what I see is that the sprite appears but it looks almost transparent and invisible.
thanks for your attention.
rraffo I updated the clamp function, so it should handle effect stacks across platforms more consistently. Please try again with the new versions (188.8.131.52).
It now also works for me on iOS.
For others with this issue here's what I changed:
mediump vec2 newTex = vTex + vec2(halfPixelHeight, pos * realSizeH);
newTex.x = clamp(newTex.x,min(srcOriginStart.x, srcOriginEnd.x),max(srcOriginStart.x, srcOriginEnd.x));
newTex.y = clamp(newTex.y,min(srcOriginStart.y, srcOriginEnd.y),max(srcOriginStart.y, srcOriginEnd.y));
Also, it seems like pixelSize is not relatively consistent across an effect stack, one way around this is to set the opacity of the object to 99%, so the effects in the effect stack then have consistent pixelSize. Otherwise you may need to use different H and V scaling for the blur.
Yes Mikal it works perfectly now. I did try 184.108.40.206 version.
Develop games in your browser. Powerful, performant & highly capable.
I know it is out of topic but I'm curious to know why when you did update the addon I didn't received any notification even if I'm following you.
Is the "following" feature working correctly or I do need to set up something more to gen a notification?
The notification panel show me everything is checked.
thanks for help.