I have a renderer:
const renderer = new THREE.WebGLRenderer({
canvas: canvas,
antialias: false,
alpha: true
})
And a ShaderMaterial:
const material = new THREE.ShaderMaterial({
uniforms: { ... },
transparent: true,
blending: THREE.NormalBlending,
vertexShader: renderVert,
fragmentShader: renderFrag
})
And i have a fragment shader (simplified here):
void main() {
gl_FragColor = vec4(vec3(0.0), 0.2);
}
But the alpha is not taken into account and the shader renders all colours fully opaque. Also with another blending mode still doesn’t work as expected. Why?