O'Reilly logo

Practical Shader Development: Vertex and Fragment Shaders for Game Developers by Kyle Halladay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Kyle Halladay 2019
Kyle HalladayPractical Shader Developmenthttps://doi.org/10.1007/978-1-4842-4457-9_4

4. Translucency and Depth

Kyle Halladay1 
(1)
Bristol, UK
 

We know from Chapter 1 that colors in computer graphics commonly are made up of red, green, blue, and alpha channels. We’ve mostly focused on ways that we can work with the red, green and blue channels, and we’ve mostly ignored the alpha channel. This chapter is going to remedy that. We’re going to use the alpha channel to draw an entire scene’s worth of differently shaped objects, render everything from aliens to sun beams, and wrap up by animating a character. How exciting!

We’re going to start off by using the alpha channel of a texture to render something that isn’t rectangular on a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required