By alternating and pausing one renderer each mainloop cycle and drawing to a black and a white BG, we can generate an alpha mask easily for a perfect composite of Flash with gradients and glows on top of any v4 layer. Add in a two-way Socket Proxy and we have full communication between the two worlds with mouse translation!
Achieved 60 FPS with Flash and a 60 FPS encoded WMV on a Quad Core.
Ask if you have specific questions…
float4 psSubtractInverted(vs2ps In):Color
{
float4 outColor = { 0.0, 0.0, 0.0, 1.00000 };
//source texture lookup
float4 src01 = tex2D(Src01Samp, In.Src01Cd);
// the mask texture lookup
float4 src02 = tex2D(Src02Samp, In.Src02Cd);
float4 temp = {0.0,0.0,0.0,1.0};
temp = abs( src01 - src02 );
temp = 1 - temp;
outColor = lerp(temp, src01, Src02Alpha);
return outColor;
}
TransparentFlash.jpg (94.9 kB)