1.add DrawRect2D.vert/.geom shaders
2.add AlphaMask.frag shader
This commit is contained in:
16
shader/AlphaMask.frag
Normal file
16
shader/AlphaMask.frag
Normal file
@@ -0,0 +1,16 @@
|
||||
#version 450 core
|
||||
|
||||
layout(binding = 2) uniform sampler2D tex;
|
||||
|
||||
layout(location = 0) in vec2 FragmentTexCoord;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color=texture(tex,FragmentTexCoord);
|
||||
|
||||
if(color.a<0.3)
|
||||
discard;
|
||||
|
||||
FragColor=vec4(color.rgb,1);
|
||||
}
|
Reference in New Issue
Block a user