the two things I couldn’t figure out:
—how to get the script attribute to the shader
—it doesn’t seem to update the resolutions on resize.
(it’s also not script 2.0 so probably should look into that and update)
Only problem was that the script wouldn’t parse properly. I had to delete the definition of the effect before the script object is defined to make the parse succeed. I then re-added it and it worked. Maybe @vaios or @max know why.
These post effect scripts have not been updated to the new script system yet. I’ll try to do that as soon as possible Although should be pretty straightforward to do it on your own for your copies if you wanna get it done sooner.
Do you see the script attribute in the Editor? If not you need to re-parse the script (just select it in the asset explorer and click Parse on the Inspector.
Then inside your script in the handler of attr:pixelize you probably want to do something like:
this.on('attr:pixelize', function (value, prev) {
effect.pixelize = value;
});
I noticed in your video that you clicked the parse button for the script twice (once when you selected the script in the asset explorer and once when you added it to a script component). You don’t have to do this - just the first time would be enough