23 lines
296 B
Plaintext
23 lines
296 B
Plaintext
|
#stencil write
|
||
|
|
||
|
@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(1.0);
|
||
|
}
|
||
|
@end
|
||
|
|
||
|
#include <base.cg>
|