Here's an optimized RGB decompose that uses a special LICE blend mode (undocumented in reaper_video, documented in lice.h):
Code:
//RGB decompose (fast undocumented version)
//@param 1:r.x "red x offset" 0 -100 100 0 1
//@param 2:r.y "red y offset" 0 -100 100 0 1
//@param 3:g.x "green x offset" 0 -100 100 0 1
//@param 4:g.y "green y offset" 0 -100 100 0 1
//@param 5:b.x "blue x offset" 0 -100 100 0 1
//@param 6:b.y "blue y offset" 0 -100 100 0 1
gdf=g.x != r.x || g.y != r.y;
bdf=b.x != r.x || b.y != r.y;
colorspace='RGBA';
input_info(0,project_w,project_h);
gfx_fillrect(0,0,project_w,project_h);
!gdf || !bdf ? gfx_blit(0) : (
gfx_mode=0xfa; gfx_blit(0,0, r.x,r.y);
);
gdf ? (gfx_mode=0xf5; gfx_blit(0,0, g.x,g.y) );
bdf ? (gfx_mode=0xf0; gfx_blit(0,0, b.x,b.y) );