about 图形学中的融合。

属于图形学系列文章

alpha blending

除了 RGB 之外,还有 Alpha Channel,OpenGL 使用 GL_BLEND 来处理 alpha blending

Compositing Functions

Transparency

  • Opaque fragments have $s_a = 1$
    • Framebuffer gets overwritten
  • Transparent fragments have $s_a= 0$
    • Framebuffer remains unchanged
  • Translucent fragments have $0 < s_a < 1$
    • Color gets blended

Order Matters

Render opaque objects first (occlusion resolved)

Render translucent objects from back to front, Only for fragments passing the depth test (i.e., not behind any opaque objects) 从后到前是指必须先绘制离屏幕更远的三角形(深度值较高)。详见链接

Set depth buffer to read-only (Retains the depth of opaque objects only)

Other Compositing Functions