← Back

ofxMask

github.com/nariakiiwatani/ofxMask · @nariakiiwatani
OF 0.10 Graphics

Draws grayscale mask textures and applies them as transparency to mask other drawing content.

16 5 Last commit 8y ago Created 13y ago

Forks

Forks pushed to more recently than nariakiiwatani/ofxMask itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

radamchin/ofxMask by @radamchin · ★ 0 · pushed 1y ago

README

ofxMask

an easy way to mask

how to use

ofxMask mask;

// creating masker texture mask.beginMask(); // draw masker here in gray scale ofSetColor(255); ofRect(100, 200, 100, 50); ofSetColor(128); // more black, more transparent ofEllipse(250, 100, 150, 150); mask.endMask();

// creating maskee texture mask.begin(); // draw maskee here sometexture.draw(); mask.end();

// draw result mask.draw();

use beginMask(false) and begin(false) not to clear textures.

Get this addon

HTTPS
SSH