I want to create a mask in my material that is generated from maths rather than a texture.
I want to be able to create a simple white square in a particular coordinate to use as a lerp mask but can't work out how or if it's even possible.
The closest math I've seen is from taking sprites out of a flipbook texture however this is kind of the reverse of what I want to do.
Any ideas would be great!:)
Replies
Thanks to radiancef0rge for the assist!
If anyone can improve on it or comment please do so.
If texcoords > or = to cornerCoord output 1 else output 0
If texcoords < or = to cornerCoord + sideWidth output 1 else output 0
multiply if's together.
http://udn.epicgames.com/Three/MaterialMasks.html
Can come in handy.