Game Development Reference
In-Depth Information
Summary
In this chapter, we first discussed simple coloring of objects using vertex colors. In
our example, we passed vertex colors and vertex positions to the shader. The shader
then interpolated color values of vertices across primitives.
We learned how to export objects from Blender in the OBJ format and render the
objects by converting them to the JSON format. The JSON format we used stored
indices, colors, normals, and UV maps in the faces array.
We also learned that vertex normals are used for illumination models.
We learned about different illumination models such as Lambert and Blinn-Phong.
Lambert is used to render objects with diffuse materials and diffuse light. Blinn-
Phong is used to render objects with a specular material. These illumination models
are used in shading algorithms such as Gouraud and Phong.
In the next chapter, we will render a complete scene of 5000 AD.
 
Search WWH ::




Custom Search