After identifying and showing the triangles correctly, it is necessary to add some color to the work. And the best way to achieve this in computer graphics is to use light, especially if you give it a little bit of bloom. So we need light, and of course, we need to code it. But how is this possible? Different reactions of light take place on different surfaces, some reflect and some do not. How can this be done? If you’ve heard of a concept called shading, that’s where it comes in. It is not possible to add depth perception to an image without shading. The Shading we talked about in this section is not the same as the shading thing meant in 3D engines, if you are using 3d engines, keep this in mind, here we do not play with the positions of the vertexes. I would like to tell you about the light events in ray tracing in detail here, but I have not fully understood it yet. So I’ll put the general formula used below. However, in general, the lights in the environment have parameters. (Position, radiance, etc…) At the same time, the materials of the objects in the environment have properties and we calculate and show the color of the intersection at that point by looking at the interactions of these properties with light. For more information you can look at lightning equation.