Skip to content

Alpha Masking

Pete Shand edited this page Jul 22, 2018 · 4 revisions

Lightweight Alpha Masking

Masking has been implemented within the base fuse fragment shader. This enables image to display object alpha masking with no additional draw calls and at almost no extra performance hit.

var texture:FileTexture = new FileTexture("img/kea.png");
texture.directRender = true;

var image:Image = new Image(texture);
addChild(image);
image.alignPivot();
		
quad = new Quad(256, 256, 0xFFFFFFFF);
addChild(quad);
quad.alignPivot();
		
quad.mask = image;
```## ### 

Basics

Features

Clone this wiki locally