(co.chromakey.jxs) How to shrink foreground while preserving transparent edges?

zlp's icon

I'm using the chromakey shader with binary 1. I'm scaling my foreground image (with td.rota.jxs) so it doesn't fill the entire rendering window. This reveals black (or technically transparent) pixels around the edges, but I would like the chromakey shader to let the keyed background image show through these edges. (Imagine my actor is standing in the middle of a greenscreen. I key out the green but I want to shrink the image of the actor relative to the composited background.)

Do I need to use binary 0 so the chromakey shader outputs only the alpha, and then do some sort of compositing to add the edges to the alpha and then use alphaglue for the actual key? Sorry if it's obvious but I've done a lot of experiments and can't find an answer. Thanks for any advice - ZLP

Max Patch
Copy patch and select New From Clipboard in Max.

A test patch:

zlp's icon

Replying to my own post... I solved this problem by using multiple videoplanes for compositing (instead of doing it directly within the chromakey shader and sending the result to a videoplane). Much better.