2024-05-30 17:12:54 -05:00
|
|
|
@block vert
|
|
|
|
uniform vec4 rect;
|
|
|
|
uniform vec2 diffuse_size;
|
|
|
|
void vert()
|
|
|
|
{
|
|
|
|
pos *= vec3(diffuse_size * rect.zw,1);
|
|
|
|
uv = (uv*rect.zw)+rect.xy;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@block frag
|
2024-10-04 00:45:44 -05:00
|
|
|
|
2024-05-30 17:12:54 -05:00
|
|
|
void frag()
|
|
|
|
{
|
|
|
|
color = texture(sampler2D(diffuse,smp), uv);
|
2024-10-08 02:46:59 -05:00
|
|
|
if (color.a == 0) discard;
|
2024-05-30 17:12:54 -05:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
#include <base.cg>
|