好吧,首先,我在 GLSL 着色器方面还很新,我正试图围绕下面的着色器
#ifdef GL_ES
//precision mediump float;
precision highp float;
#endif
uniform vec2 uTimes;
varying vec2 texCoord;
varying vec2 screenCoord;
void main(void) {
vec3 col;
float c;
vec2 tmpv = texCoord * vec2(0.8, 1.0) - vec2(0.95, 1.0);
c = exp(-pow(length(tmpv) * 1.8, 2.0));
col = mix(vec3(0.02, 0.0, 0.03), vec3(0.96, 0.98, 1.0) * 1.5, c);
gl_FragColor = vec4(col * 0.5, 0);
}
到目前为止,我知道它给了我一个径向渐变(也许)。我真正想知道的是如何让它完全透明。我在想我需要一个 vec4,对吧?