初次提交
This commit is contained in:
10
第12章 几种剪裁与测试/Sample12_2/assets/frag_tex_at.sh
Normal file
10
第12章 几种剪裁与测试/Sample12_2/assets/frag_tex_at.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
precision mediump float;
|
||||
varying vec2 vTextureCoord; //接收从顶点着色器过来的参数
|
||||
uniform sampler2D sTexture;//纹理内容数据
|
||||
void main() {
|
||||
vec4 bcolor = texture2D(sTexture, vTextureCoord);//给此片元从纹理中采样出颜色值
|
||||
if(bcolor.a<0.6) {
|
||||
discard;
|
||||
} else {
|
||||
gl_FragColor=bcolor;
|
||||
}}
|
||||
Reference in New Issue
Block a user