2024-10-02 20:14:45 -05:00
|
|
|
@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;
|
2024-10-03 09:31:06 -05:00
|
|
|
color = vec4(0.0);
|
2024-10-02 20:14:45 -05:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
#include <base.cg>
|