C2-DEX Fullscreen Version by Funky Koval and Gigatron, original by Tulamide.
http://s000.tinyupload.com/?file_id=86337528332899979782 - UPDATED WITH VALPHACLIP EFFECT
C2-DEX Fullscreen Version is a palette remapper, based on C-DEX (https://www.scirra.com/forum/effect-c-dex_t69823) for Construct Classic by Tulamide. With generous help from Gigatron, I managed to get it it working order and am releasing it to the public. The effect is in the "Fullscreen" category. Here are some captures from the demo included:
Here are some usage instructions:
-The most important thing to note is that the sprite containing the palette image must fit the game display area completely, otherwise incorrect colors will be sampled and artifacts will appear. That's why it's called the "Fullscreen Version".
-Palette sprite rotation is not supported, which should be a moot point, since it has to fit the screen.
-To remap the whole screen without any masking, all that's needed is the palette sprite stretched across the screen with the effect applied.
-Masking the effect uses the palette sprite's Alpha channel - the only limitation is that the pixel row from which the remap palette is taken has to be completely opaque. More about this in the parameter description section...
UPDATE Use VAlphaClip on the mask objects to clip them as they get close to the screen vertical edges. See updated demo .capx
-A more dynamic way of masking would be applying the effect to a layer and using the Destination Out blend mode on alpha sprites to cut the layer alpha (this method is shown in the .capx file). However, the limitation above applies - the palette row has to stay opaque.
UPDATE See above for workaround.
And now for the parameter descriptions:
Palette Y - the pixel row that will be used as the remap palette. 0 would be the top-most row and 1 the bottom. Inbetweens are handled accordingly. Remember that this particular row has to be completely opaque, otherwise invalid colors will be sampled.
Invert Mask Alpha - inverts the effect masking.
Intensity - blends the original colors with the remapped colors. If set to 0, effect has no... effect. If 1, only the remapped image is visible.
Have fun and enjoy the effect. And now to why it says "help needed" in the subject:
-For all shader writers: how would one write a shader that works like the "Destination Out" blend mode, but only on Alpha, preserving RGB? Using this shader on the masks would remove the limitation of having the palette pixel row fully opaque.
Any help is most apprectiated.