Im showing 2D content on simple Stage3D plane made of 2 triangles. Content is drawn on BitmapData and uploaded as texture in case of redraw. I also have the AGAL program to give transparency for the whole container.
What I would like to do is to use GPU to give "fade to transparent" effect for the edges of container to blend nicely with another containers. Also to use program constants to control the faded edges.
Currently using this shader code:
vertex assembler:
"m44 op, va0, vc0 \n" +
"mov v0, va0 \n" + // tell fragment shader about XYZ
"mov v1, va1 \n" + // tell fragment shader about UV
"mov v2, va2\n"; // tell fragment shader about RGBA
fragment assembler:
"tex ft0, v1, fs0 <2d,clamp,linear> \n" +
"mul ft0.a, ft0.a, fc0.x\n" + // manage alpha value that is set as program constant
"mov oc, ft0 \n"; // move this value to the output color
Any help or hints is really appreciated