'ShaderMaterial alpha 0 won't render correctly

See JSFiddle https://jsfiddle.net/k2xl/tgharsv3/59/

varying mediump vec3 vNormal;

        void main() {

      float disableSide = 1.; // TURNING THIS TO 0 SHOWS THE ISSUE
      vec4 col  = vec4(1.);
        if (vNormal.x > 0.) {
           // face 1
           col = vec4(0.,0.,0.5,disableSide);
                } else if (vNormal.y > 0.) {
                    // face 2
           col = vec4(1.,1.,1.,1.);
                } else if (vNormal.z < 0.) {
                    // face 3
           col = vec4(0.5,0.5,0.,1.);
                } else if (vNormal.x < 0.) {
                    // face 4
          col = vec4(0.,0.,1.,1.);
                } else if (vNormal.y < 0.) {
                    // face 5
          col = vec4(0.,1.,0.,1.);
                } else {
                    // face 6
          col = vec4(1,0.,0.,1.);
                }
            gl_FragColor = col;
        }

Cube

I should see the backside, but it is as if it isn't rendering since even though the face alpha is 0 it thinks it can't render maybe?

Using side:THREE.DoubleSide didn't seem to work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source