© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
D. IlettBuilding Quality Shaders for Unity®https://doi.org/10.1007/978-1-4842-8652-4_8

8. Transparency and Alpha

Daniel Ilett1  
(1)
Coventry, UK
 

In computer graphics, opaque and semitransparent objects are handled very differently from one another. Rendering opaque objects is relatively easy, because every time we attempt to draw a pixel, we either fully replace the existing color value (if the depth test passes) or do not modify the existing value (if the depth test fails). With transparent rendering, the color of the pixel being rendered is blended with the existing value in the color buffer. When multiple transparent objects overlap on the same pixel, the ...

Get Building Quality Shaders for Unity®: Using Shader Graphs and HLSL Shaders now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.