Got a minimal example working with these changes:
Control Create event at the bottom:
u_voron_vsize = shader_get_uniform( sh_voronoimerger, "vsize" ) p2size = 0
(+ added some keyboard events to let me increment/decrement p2size with 0.001 at a time - it's in screenspace coordinates so 1.0 means "100% of the screen width/height" so in-game you want small decimal values for a small pop-in view)
Control Post Draw event, line 14:
shader_set_uniform_f( u_voron_vsize, 0, p2size, 0, 0)
(note how vsize[0] doesn't matter so I always set it to 0, but player 3 and 4 are set to 0 because we wanna disable their views - so different reasons)
sh_voronoimerger (Fragment):
New line before main:
uniform vec4 vsize;
Lines 20~31 changed like so,
//Go find the nearest screen position and use that float bestdist = 999999.99, dist; int bestid = 0; for(int c = 3; c > 0; c--){ if(c < num_players){ dist = distance(screenpos[c].xy,v_vTexcoord); if(dist < vsize[c]){ bestdist = dist; bestid = c; } } } gl_FragColor = sampcol[bestid];
I.e. run the loop backwards, don't run it for 0, but default to 0 if you don't pass the distance check any time.