prosperon/shaders/mask.cg

21 lines
280 B
Plaintext

@block vert
uniform vec4 rect;
void vert()
{
pos *= vec3(rect.zw,1);
uv = (uv*rect.zw)+rect.xy;
}
@end
@block frag
uniform vec4 shade;
void frag()
{
color = texture(sampler2D(diffuse,smp), uv);
if (color.a == 0.0) discard;
color = vec4(0.0);
}
@end
#include <base.cg>