step函数
step(edge,x):当x>edge时返回1,否则返回0
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
void main(){
vec2 st = gl_FragCoord.xy/u_resolution.xy;
float f = step(0.5, st.x);
gl_FragColor = vec4(f, 0, 0, 1.0);
}

类似下面的javaScript代码
float myStep(float edge, float x){
if(x>= edge){
return 1.0;
}else{
return 0.0;
}
}







![如何在内网中与阿里云服务器进行文件传输?[2024详细版]](https://i-blog.csdnimg.cn/direct/3ce837044dc44cc7a2aaf71b49918505.png)










