Summary

In this chapter, we have seen how to use colors on objects, lights, and on the scene in general. Specifically, we have learned that an object can be colored per vertex, per fragment, or it can have a constant color.

The color of light sources in the scene depends on implemented lighting model. Not all lights need to be always white. We have also seen how uniform arrays simplify working with multiple lights in ESSL and in JavaScript WebGL. Also we have created point directional lights.

The alpha value does not necessarily make an object translucent. Interpolative blending is necessary to create translucent objects. Also, the objects need to be rendered back-to-front.

Additionally, face culling can help to produce better results when there are multiple translucent objects present in the scene.

In Chapter 7, Textures, we will study how to paint images over our objects. For that we will use WebGL textures.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.233.72