Shader Learn

09 Drawing in several passes

Blending: transparency is a formula

Move the translucent object and watch the ring behind it; then switch blending modes.

0.11
-1.41.4
Explanation

Drag the underlined numbers left and right

material.transparent = true;material.opacity = ;material.depthWrite = ;material.blending = THREE.;mesh.position.z = ;
Blend formulaNormal: src × α + dst × (1 − α). Additive: src × α + dst.

Transparency is blending: the new colour is combined with what the buffer already holds. Order changes the result, so transparent objects need sorting.

Try it

  • Turn off depth write and compare the ring behind
  • Switch to Additive