<p>The rendering equation aims to describe what the light distribution for a specific scene is, under several assumptions. The most important assumption is that we are working in a <strong>geometrical optics framework</strong> - so we do not consider the wave properties of light - meaning no diffraction for example, we also do not consider quantum effects, such as phosphorescence. If the rendering equation is not in its spectral form, then there's also no dispersion. </p>

<p>There are additional constraints on top of what we have for geometrical optics, like <strong>light travels instantaneously</strong>, light rays traveling in <strong>straight paths</strong> from surface to surface (no spatially continuously varying indices of refraction), no polarization, etc. Many of the constraints can be removed in more general formulations (which are also available), but usually that incurs heavier computations.</p>

<p>So the rendering equation serves as an approximation to how light works in the real world, but since we want to model only a subset of light effects, various simplification are made in order to make the problem easier to solve. </p>

<p>Let us consider the commonly shown formulation:</p>

<p><a href="https://i.sstatic.net/pTB8o.png" rel="noreferrer"><img src="https://i.sstatic.net/pTB8o.png" alt="The rendering equation"></a>
<a href="https://i.sstatic.net/zDg2Q.png" rel="noreferrer"><img src="https://i.sstatic.net/zDg2Q.png" alt="The rendering equation"></a></p>

<p>The above images are linked from: <a href="http://viclw17.github.io/2018/06/30/raytracing-rendering-equation/" rel="noreferrer">Raytracing - Rendering Equation Insight</a></p>

<p>I believe these images are fairly self-explanatory. The function <span class="math-container">$f_r$</span> referred to as the <a href="https://en.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function" rel="noreferrer">BRDF</a> (or more generally the <a href="https://en.wikipedia.org/wiki/Bidirectional_scattering_distribution_function" rel="noreferrer">BSDF</a>) describes the interaction of materials with light. Often in real-time graphics this is referred to as the illumination or reflectance model - one such example is <a href="https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_reflection_model" rel="noreferrer">the Blinn–Phong reflection model</a>, there is the <a href="https://en.wikipedia.org/wiki/Specular_highlight#Cook%E2%80%93Torrance_model" rel="noreferrer">Cook-Torrance model</a> too, and several others. All of those are brdfs/bsdfs, or constituent parts of brdfs/bsdfs.</p>

<p>Flat, Gouraud, and Phong shading (or more correctly Gouraud and Phong <strong>interpolation</strong>) is really referring to how the normals of a model are treated (interpolated). </p>

<p><a href="https://en.wikipedia.org/wiki/Shading#Flat_shading" rel="noreferrer">Flat shading</a> simply uses the actual normals of an object. If we could render objects made up of infinitely many triangles, even flat shading would be ideal. However, as for most things in graphics, efficiency is key, so we cannot use infinitely may triangles. For that reason people have chosen to modify the surface normals of objects, in order to get a smoother appearance - as if they used a lot more triangles. How is this achieved? Well, one can find per-vertex normals, that are a weighted sum of the face normals, so that a smooth like appearance is achieved. For example by using approaches such as the one described in the following publication: <a href="https://www.semanticscholar.org/paper/Weights-for-Computing-Vertex-Normals-from-Facet-Max/f6eb2950de296424d35338893f193fb3adb74367" rel="noreferrer">Weights for Computing Vertex Normals from Facet Normals</a>. </p>

<p><a href="https://en.wikipedia.org/wiki/Gouraud_shading" rel="noreferrer">Gouraud shading</a> (Gouraud interpolation), refers to computing the illumination per vertex, using these normals, and then <strong>interpolating</strong> the resulting color over the triangle - this explains why it has discontinuities at edges and vertices. </p>

<p><a href="https://en.wikipedia.org/wiki/Phong_shading" rel="noreferrer">Phong shading</a> (Phong interpolation) <strong>interpolates</strong> the normals over the triangle (by using barycentric coordinates) and then computes the shading using those per-pixel which results in an overall smoother appearance. Note that discontinuities at the outline of the object can still be visible - this modifies only the shading of the object, and not its actual geometry.</p>

<p>One can go further and use <a href="https://en.wikipedia.org/wiki/Bump_mapping" rel="noreferrer">bump mapping</a>, <a href="http://johnwhigham.blogspot.com/2015/03/derivative-mapping.html" rel="noreferrer">derivative mapping</a>, or <a href="https://en.wikipedia.org/wiki/Normal_mapping" rel="noreferrer">normal mapping</a>, in order to further enrich the shading information over an otherwise flat surface, by modifying the normals.</p>

<p>All of those normal modifications (Gouraud and Phong interpolation; bump, derivative, and normal mapping) produce normals which are commonly referred to as shading normals. Note that those violate energy conservation principles in general, and may cause various artifacts. But obviously this is the trade-off for performance. So <strong>all of those techniques fall under the umbrella of normals modification and are not illumination models in their own right</strong> (but those normals are used in the brdf and the rendering equation to compute shading - where the shading part in the terms goes - I still believe interpolating is a better naming).</p>

<p>To understand the shadow conundrum, let's look at the solution of the rendering equation. The rendering equation in mathematics is known as a <a href="https://en.wikipedia.org/wiki/Fredholm_integral_equation#Equation_of_the_second_kind" rel="noreferrer">Fredholm integral equation of the second kind</a>, under some assumptions, its solution is given through the sum of increasingly dimensional integrals: <a href="https://en.wikipedia.org/wiki/Liouville%E2%80%93Neumann_series" rel="noreferrer">Liouville–Neumann series</a>. I will avoid writing out the integrals explicitly, since it will get ugly very quickly, you can find the expansion in Veach's thesis however. I will just use the operator formulation of the rendering equation. Let <span class="math-container">$L = L_o$</span>, and <span class="math-container">$T$</span> be that integral from the images. Then the rendering equation can be written concisely as:</p>

<p><span class="math-container">$$L = L_e + L_r = L_e + TL$$</span>
<span class="math-container">$$L-TL = L_e$$</span>
<span class="math-container">$$(I-T)L = L_e$$</span>
<span class="math-container">$$L = (I-T)^{-1}L_e = \sum_{k=0}^{\infty}T^kL_e$$</span></p>

<p>The last equality holds due to the Liouville-Neumann expansion that I talked about. This is a sum of increasingly dimensional integrals similar to the one you had in the rendering equation (with a few additions) - usually this is also done with respect to the area formulation of the rendering equation (the images here provide the solid angle formulation). Informally <span class="math-container">$T^k$</span> means that there were <span class="math-container">$k$</span> bounces before reaching the light source, so it's a sum of the energy coming from paths starting at the eye and ending at a light source, of length <span class="math-container">$1, 2, 3, ..., \infty$</span>. Let's look at the area formulation of the rendering equation:</p>

<p><span class="math-container">$$L(\pmb{x}_0\leftarrow\pmb{x}_1) = L_e(\pmb{x}_0\leftarrow\pmb{x}_1) + \\ \int_{\mathcal{M}}f_r(\pmb{x}_0\leftarrow\pmb{x}_1\leftarrow\pmb{x}_2)L(\pmb{x}_1\leftarrow\pmb{x}_2)\frac{\cos\theta_{\pmb{x}_1}\cos\theta_{\pmb{x}_2}}{\|\pmb{x}_2-\pmb{x}_1\|^2_2}V(\pmb{x}_1,\pmb{x}_2)\,d\pmb{x}_2$$</span></p>

<p>Here <span class="math-container">$\mathcal{M}$</span> is the set of all surface points of the scene (including lights), <span class="math-container">$L(\pmb{x}_0\leftarrow\pmb{x}_1)$</span> gives you the radiance traveling from surface point <span class="math-container">$\pmb{x}_1$</span> to <span class="math-container">$\pmb{x}_0$</span>, <span class="math-container">$L_e(\pmb{x}_0\leftarrow\pmb{x}_1)$</span> gives you the emission from <span class="math-container">$\pmb{x}_1$</span> towards <span class="math-container">$\pmb{x}_0$</span>. To relate the brds to the previous formulation, one can set: <span class="math-container">$\omega_o = \frac{\pmb{x}_0-\pmb{x}_1}{\|\pmb{x}_0-\pmb{x}_1\|}$</span>, <span class="math-container">$\omega_i = \frac{\pmb{x}_2-\pmb{x}_1}{\|\pmb{x}_2-\pmb{x}_1\|}$</span>, and <span class="math-container">$\pmb{x} = \pmb{x}_1$</span>. Furthermore, <span class="math-container">$\cos\theta_{\pmb{x}_1} = \omega_i \cdot \pmb{n}$</span>, where <span class="math-container">$\pmb{n}$</span> is the surface normal at <span class="math-container">$\pmb{x}_1$</span>, similarly <span class="math-container">$\cos\theta_{\pmb{x}_2} = -\omega_i \cdot \pmb{n}_{\pmb{x}_2}$</span>, where <span class="math-container">$\pmb{n}_{\pmb{x}_2}$</span> is the surface normal at <span class="math-container">$\pmb{x}_2$</span>. The squared Euclidean distance in the denominator is due to the <a href="https://en.wikipedia.org/wiki/Inverse-square_law" rel="noreferrer">inverse-square law</a> (it's implicitly encoded in the solid angle formulation). Finally, <span class="math-container">$V(\pmb{x}_1,\pmb{x}_2)$</span> is the visibility function - it is equal to <span class="math-container">$1$</span> if there is nothing between <span class="math-container">$\pmb{x}_1$</span> and <span class="math-container">$\pmb{x}_2$</span> (no occlusion), and <span class="math-container">$0$</span> otherwise (it is also implicit in the solid angle formulation) - this is the function that encodes shadows. Approximations, that do not produce shadows, have simply thrown away or modified that visibility function (one such modification is replacing <span class="math-container">$V$</span> with the ambient occlusion or with information from a shadow map). This is done for efficiency reasons once again, as instead you would have to trace a ray from <span class="math-container">$\pmb{x}_1$</span> to <span class="math-container">$\pmb{x}_2$</span> and intersect against the scene to check for occlusion.</p>

<p>Let us consider the simplifications that are usually made in real-time graphics. Most implementations, simply cut the Neumann sum to the 2nd term:</p>

<p><span class="math-container">$$L = L_e + TL_e + T^2L_e + ... \approx L_e + TL_e$$</span></p>

<p>So anything beyond direct illumination and emission is thrown away. This has important implications - such as: no indirect illumination or scattering effects. Let's consider what this amounts to:</p>

<p><span class="math-container">$$L = L_e + TL_e$$</span></p>

<p><span class="math-container">$$L(\pmb{x}_0\leftarrow\pmb{x}_1) = L_e(\pmb{x}_0\leftarrow\pmb{x}_1) + \\ \int_{\mathcal{M}}f_r(\pmb{x}_0\leftarrow\pmb{x}_1\leftarrow\pmb{x}_2)L_e(\pmb{x}_1\leftarrow\pmb{x}_2)\frac{\cos\theta_{\pmb{x}_1}\cos\theta_{\pmb{x}_2}}{\|\pmb{x}_2-\pmb{x}_1\|^2_2}V(\pmb{x}_1,\pmb{x}_2)\,d\pmb{x}_2$$</span></p>

<p>There is one small difference compared to the area formulation, and that is the fact that we have <span class="math-container">$L_e$</span> in the integral and not <span class="math-container">$L$</span>, so it is not a recursive integral anymore. It is still an integral however, which implies an infinite sum - this is currently not very fast to compute, unless you have specialized hardware like RTX, especially for more complex scenes. Note that the integral is over all surface points emitting light, so you would in general need to sum up the light coming from area lights, skyboxes etc.</p>

<p>So the next simplification that is usually done, is using point lights. Point lights have the computationally efficient property, that they are represented through <a href="https://en.wikipedia.org/wiki/Dirac_delta_function" rel="noreferrer">Dirac delta functions</a>. A Dirac delta function, essentially allows you to get rid of the integral - the light comes only from a single direction. Then your integral turns into a finite sum over all point lights in the scene (a similar argument may be made for directional or spot lights, note that the light cosine term disappears, since informally there's no normal to speak of):</p>

<p><span class="math-container">$$L(\pmb{x}_0\leftarrow\pmb{x}_1) = L_e(\pmb{x}_0\leftarrow\pmb{x}_1) + \\ \sum_{k=1}^{N}f_r(\pmb{x}_0\leftarrow\pmb{x}_1\leftarrow\pmb{y}_k)L_k(\pmb{x}_1\leftarrow\pmb{y}_k)\frac{\cos\theta_{\pmb{x}_1}}{\|\pmb{y}_k-\pmb{x}_1\|^2_2}V(\pmb{x}_1,\pmb{y}_k)$$</span></p>

<p>Where <span class="math-container">$L_e$</span> is generally constant, <span class="math-container">$L_k$</span> is the radiance of light source <span class="math-container">$k$</span> and <span class="math-container">$\pmb{y}_k$</span> is the position of light source <span class="math-container">$k$</span>. If your material is diffuse then <span class="math-container">$f_r$</span>  and the radiance of the point light do not change with directions, then <span class="math-container">$L_i$</span> and <span class="math-container">$f_r$</span> are also constant so you get the (possibly) familiar expression:</p>

<p><span class="math-container">$$L = L_e + \sum_{k=1}^{N}f_rL_k\cos\theta_k V(\pmb{x}_1,\pmb{y}_k)$$</span>
<span class="math-container">$$color = emission + \sum_{k=1}^{N}ObjectColor * LightColor * \cos\theta_k * VisibilityFromLight\_k$$</span></p>

<p>The only thing that is usually not there is the <span class="math-container">$V$</span> term, since it requires tracing rays through the scene, which standard rasterization algorithms don't do. So it's either set to <span class="math-container">$1$</span>, or replaced with information from a shadow map (for each summand the shadow map from this light's perspective ought to be used for semi-correct results). Often times the remaining terms that were cut off <span class="math-container">$T^2L_e + T^3L_e + ... + T^{\infty}L_e$</span> are substituted with a constant ambient light term or with an ambient occlusion term.</p>

<p>Path tracing usually solves the rendering equation without any of the above simplifications (but requires a lot more computational power), that is the reason why images produced by it look so realistic.</p>

<p>Whole books may be written on this matter. But I hope I managed to clarify at least some things regarding Gouraud, Phong interpolation, shadows, and how all of this ties into the rendering equation.</p>

CC BY-SA 4.0
2019-10-16T18:19:31.910Z
@Nikos I assume you understand the interpolation strategies in terms of how it works in practice? In practice (rasterized graphics) you do not get shadows, because you simply do not check whether there is an object between the point that you are shading and the light source (occlusion). In ray tracing you do check that, this corresponds to my comments about the visibility function $V(x,y)$ and how it is usually not present in rasterized graphics. Ray tracing and GI try to solve the equation without throwing away $V(x,y)$ and cutting the number of bounces to 1 (also more than point lights).
lightxbulb
CC BY-SA 4.0
2019-10-16T19:26:04.503Z
@Nikos It is in the answer: "Approximations, that do not produce shadows, have simply thrown away or modified that visibility function (one such modification is replacing V with the ambient occlusion or with information from a $\textbf{shadow map}$).". Shadow mapping is a technique which renders the depth as perceived by a light source in a texture, and then this is used to approximate $V(x,y)$. Note that this only works for point lights, and cannot be truly omnidirectional (it just renders the 6 faces of a cube). It is also limited by the resolution of the texture map.
lightxbulb
CC BY-SA 4.0
2019-10-13T14:24:12.247Z
2019-10-13T14:30:42.087Z
2019-10-13T14:30:42.087Z
lightxbulb
<p>What is the difference between all these techniques? I know what a lightning model does, eg Phong, Flat, Gouraud. As far as I know both Ray Tracing and Global Illumination are just lighting models different from the classic ones mentioned above that simulate physical light more accurately, taking into account light ray bouncing, indirect light etc.</p>

<p>As for shadows, I believe not all lighting models can support shadows. Are shadows something implemented on top of a lighting model, ie they can't be used without a proper one that supports them, or are they used independently of lighting?</p>

<p>I know that the rendering equation is a general technique for the approximation of lighting in a 3D world. Is the rendering equation used in conjuction with a lighting model, or is a "lighting model" an implementation of the redering equation?</p>

<p>Does the rendering equation account for shadows as well (from its form on wikipedia I think not) and if not should an "extended" rendering equation be developed for a particular 3d world that enables shadows?</p>

<p>I'm trying to clarify this foggy cloud of concepts in my mind. Thanks in advance.</p>

CC BY-SA 4.0
2019-10-13T13:29:08.153Z
"*I know what a lightning model does, eg Phong, Flat, Gouraud.*" And yet, those are not lighting models. They're ways of interpolating the normal across a surface. There is such a thing as the Phong lighting model, but that's distinct from Phong shading. "*As far as I know both Ray Tracing and Global Illumination are just lighting models*" These too are not lighting models.
Nicol Bolas
CC BY-SA 4.0
2019-10-13T13:54:33.137Z
@NicolBolas That's why I asked the question; to disambiguate the terminology.
KeyC0de
CC BY-SA 4.0
2019-10-13T14:42:10.470Z
@NicolBolas The question is literally "Difference betwen Rendering Equation, Lighting model, Ray Tracing, Global Illumination and Shadows?", I don't know why it got downvoted. Please reconsider upvoting it back up if you downvoted it. It's a good question, and one often not explained in many references and articles.
lightxbulb
<rendering><lighting><global-illumination><shading><theory>
Difference betwen Rendering Equation, Lighting model, Ray Tracing, Global Illumination and Shadows?
KeyC0de
# Difference betwen Rendering Equation, Lighting model, Ray Tracing, Global Illumination and Shadows?

(Asked by: username_0 on 2019-10-13)

What is the difference between all these techniques? I know what a lightning model does, eg Phong, Flat, Gouraud. As far as I know both Ray Tracing and Global Illumination are just lighting models different from the classic ones mentioned above that simulate physical light more accurately, taking into account light ray bouncing, indirect light etc.

As for shadows, I believe not all lighting models can support shadows. Are shadows something implemented on top of a lighting model, ie they can't be used without a proper one that supports them, or are they used independently of lighting?

I know that the rendering equation is a general technique for the approximation of lighting in a 3D world. Is the rendering equation used in conjuction with a lighting model, or is a "lighting model" an implementation of the redering equation?

Does the rendering equation account for shadows as well (from its form on wikipedia I think not) and if not should an "extended" rendering equation be developed for a particular 3d world that enables shadows?

I'm trying to clarify this foggy cloud of concepts in my mind. Thanks in advance.

**Tags:** rendering, lighting, global-illumination, shading, theory

> **Comments:**
> **username_1**: "*I know what a lightning model does, eg Phong, Flat, Gouraud.*" And yet, those are not lighting models. They're ways of interpolating the normal across a surface. There is such a thing as the Phong lighting model, but that's distinct from Phong shading. "*As far as I know both Ray Tracing and Global Illumination are just lighting models*" These too are not lighting models.  
> **username_0**: @username_1 That's why I asked the question; to disambiguate the terminology.  
> **username_2**: @username_1 The question is literally "Difference betwen Rendering Equation, Lighting model, Ray Tracing, Global Illumination and Shadows?", I don't know why it got downvoted. Please reconsider upvoting it back up if you downvoted it. It's a good question, and one often not explained in many references and articles.  

---

## 1 answers

### Answer by username_2 on 2019-10-13. Score: 6 | Accepted answer

The rendering equation aims to describe what the light distribution for a specific scene is, under several assumptions. The most important assumption is that we are working in a **geometrical optics framework** - so we do not consider the wave properties of light - meaning no diffraction for example, we also do not consider quantum effects, such as phosphorescence. If the rendering equation is not in its spectral form, then there's also no dispersion.

There are additional constraints on top of what we have for geometrical optics, like **light travels instantaneously**, light rays traveling in **straight paths** from surface to surface (no spatially continuously varying indices of refraction), no polarization, etc. Many of the constraints can be removed in more general formulations (which are also available), but usually that incurs heavier computations.

So the rendering equation serves as an approximation to how light works in the real world, but since we want to model only a subset of light effects, various simplification are made in order to make the problem easier to solve.

Let us consider the commonly shown formulation:

[![The rendering equation](https://i.sstatic.net/pTB8o.png)](https://i.sstatic.net/pTB8o.png)
[![The rendering equation](https://i.sstatic.net/zDg2Q.png)](https://i.sstatic.net/zDg2Q.png)

The above images are linked from: [Raytracing - Rendering Equation Insight](http://viclw17.github.io/2018/06/30/raytracing-rendering-equation/)

I believe these images are fairly self-explanatory. The function $f\_r$ referred to as the [BRDF](https://en.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function) (or more generally the [BSDF](https://en.wikipedia.org/wiki/Bidirectional_scattering_distribution_function)) describes the interaction of materials with light. Often in real-time graphics this is referred to as the illumination or reflectance model - one such example is [the Blinn–Phong reflection model](https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_reflection_model), there is the [Cook-Torrance model](https://en.wikipedia.org/wiki/Specular_highlight#Cook%E2%80%93Torrance_model) too, and several others. All of those are brdfs/bsdfs, or constituent parts of brdfs/bsdfs.

Flat, Gouraud, and Phong shading (or more correctly Gouraud and Phong **interpolation**) is really referring to how the normals of a model are treated (interpolated).

[Flat shading](https://en.wikipedia.org/wiki/Shading#Flat_shading) simply uses the actual normals of an object. If we could render objects made up of infinitely many triangles, even flat shading would be ideal. However, as for most things in graphics, efficiency is key, so we cannot use infinitely may triangles. For that reason people have chosen to modify the surface normals of objects, in order to get a smoother appearance - as if they used a lot more triangles. How is this achieved? Well, one can find per-vertex normals, that are a weighted sum of the face normals, so that a smooth like appearance is achieved. For example by using approaches such as the one described in the following publication: [Weights for Computing Vertex Normals from Facet Normals](https://www.semanticscholar.org/paper/Weights-for-Computing-Vertex-Normals-from-Facet-Max/f6eb2950de296424d35338893f193fb3adb74367).

[Gouraud shading](https://en.wikipedia.org/wiki/Gouraud_shading) (Gouraud interpolation), refers to computing the illumination per vertex, using these normals, and then **interpolating** the resulting color over the triangle - this explains why it has discontinuities at edges and vertices.

[Phong shading](https://en.wikipedia.org/wiki/Phong_shading) (Phong interpolation) **interpolates** the normals over the triangle (by using barycentric coordinates) and then computes the shading using those per-pixel which results in an overall smoother appearance. Note that discontinuities at the outline of the object can still be visible - this modifies only the shading of the object, and not its actual geometry.

One can go further and use [bump mapping](https://en.wikipedia.org/wiki/Bump_mapping), [derivative mapping](http://johnwhigham.blogspot.com/2015/03/derivative-mapping.html), or [normal mapping](https://en.wikipedia.org/wiki/Normal_mapping), in order to further enrich the shading information over an otherwise flat surface, by modifying the normals.

All of those normal modifications (Gouraud and Phong interpolation; bump, derivative, and normal mapping) produce normals which are commonly referred to as shading normals. Note that those violate energy conservation principles in general, and may cause various artifacts. But obviously this is the trade-off for performance. So **all of those techniques fall under the umbrella of normals modification and are not illumination models in their own right** (but those normals are used in the brdf and the rendering equation to compute shading - where the shading part in the terms goes - I still believe interpolating is a better naming).

To understand the shadow conundrum, let's look at the solution of the rendering equation. The rendering equation in mathematics is known as a [Fredholm integral equation of the second kind](https://en.wikipedia.org/wiki/Fredholm_integral_equation#Equation_of_the_second_kind), under some assumptions, its solution is given through the sum of increasingly dimensional integrals: [Liouville–Neumann series](https://en.wikipedia.org/wiki/Liouville%E2%80%93Neumann_series). I will avoid writing out the integrals explicitly, since it will get ugly very quickly, you can find the expansion in Veach's thesis however. I will just use the operator formulation of the rendering equation. Let $L = L\_o$, and $T$ be that integral from the images. Then the rendering equation can be written concisely as:

$$L = L\_e + L\_r = L\_e + TL$$
$$L-TL = L\_e$$
$$(I-T)L = L\_e$$
$$L = (I-T)^{-1}L\_e = \sum\_{k=0}^{\infty}T^kL\_e$$

The last equality holds due to the Liouville-Neumann expansion that I talked about. This is a sum of increasingly dimensional integrals similar to the one you had in the rendering equation (with a few additions) - usually this is also done with respect to the area formulation of the rendering equation (the images here provide the solid angle formulation). Informally $T^k$ means that there were $k$ bounces before reaching the light source, so it's a sum of the energy coming from paths starting at the eye and ending at a light source, of length $1, 2, 3, ..., \infty$. Let's look at the area formulation of the rendering equation:

$$L(\pmb{x}\_0\leftarrow\pmb{x}\_1) = L\_e(\pmb{x}\_0\leftarrow\pmb{x}\_1) + \\ \int\_{\mathcal{M}}f\_r(\pmb{x}\_0\leftarrow\pmb{x}\_1\leftarrow\pmb{x}\_2)L(\pmb{x}\_1\leftarrow\pmb{x}\_2)\frac{\cos\theta\_{\pmb{x}\_1}\cos\theta\_{\pmb{x}\_2}}{\|\pmb{x}\_2-\pmb{x}\_1\|^2\_2}V(\pmb{x}\_1,\pmb{x}\_2)\,d\pmb{x}\_2$$

Here $\mathcal{M}$ is the set of all surface points of the scene (including lights), $L(\pmb{x}\_0\leftarrow\pmb{x}\_1)$ gives you the radiance traveling from surface point $\pmb{x}\_1$ to $\pmb{x}\_0$, $L\_e(\pmb{x}\_0\leftarrow\pmb{x}\_1)$ gives you the emission from $\pmb{x}\_1$ towards $\pmb{x}\_0$. To relate the brds to the previous formulation, one can set: $\omega\_o = \frac{\pmb{x}\_0-\pmb{x}\_1}{\|\pmb{x}\_0-\pmb{x}\_1\|}$, $\omega\_i = \frac{\pmb{x}\_2-\pmb{x}\_1}{\|\pmb{x}\_2-\pmb{x}\_1\|}$, and $\pmb{x} = \pmb{x}\_1$. Furthermore, $\cos\theta\_{\pmb{x}\_1} = \omega\_i \cdot \pmb{n}$, where $\pmb{n}$ is the surface normal at $\pmb{x}\_1$, similarly $\cos\theta\_{\pmb{x}\_2} = -\omega\_i \cdot \pmb{n}\_{\pmb{x}\_2}$, where $\pmb{n}\_{\pmb{x}\_2}$ is the surface normal at $\pmb{x}\_2$. The squared Euclidean distance in the denominator is due to the [inverse-square law](https://en.wikipedia.org/wiki/Inverse-square_law) (it's implicitly encoded in the solid angle formulation). Finally, $V(\pmb{x}\_1,\pmb{x}\_2)$ is the visibility function - it is equal to $1$ if there is nothing between $\pmb{x}\_1$ and $\pmb{x}\_2$ (no occlusion), and $0$ otherwise (it is also implicit in the solid angle formulation) - this is the function that encodes shadows. Approximations, that do not produce shadows, have simply thrown away or modified that visibility function (one such modification is replacing $V$ with the ambient occlusion or with information from a shadow map). This is done for efficiency reasons once again, as instead you would have to trace a ray from $\pmb{x}\_1$ to $\pmb{x}\_2$ and intersect against the scene to check for occlusion.

Let us consider the simplifications that are usually made in real-time graphics. Most implementations, simply cut the Neumann sum to the 2nd term:

$$L = L\_e + TL\_e + T^2L\_e + ... \approx L\_e + TL\_e$$

So anything beyond direct illumination and emission is thrown away. This has important implications - such as: no indirect illumination or scattering effects. Let's consider what this amounts to:

$$L = L\_e + TL\_e$$

$$L(\pmb{x}\_0\leftarrow\pmb{x}\_1) = L\_e(\pmb{x}\_0\leftarrow\pmb{x}\_1) + \\ \int\_{\mathcal{M}}f\_r(\pmb{x}\_0\leftarrow\pmb{x}\_1\leftarrow\pmb{x}\_2)L\_e(\pmb{x}\_1\leftarrow\pmb{x}\_2)\frac{\cos\theta\_{\pmb{x}\_1}\cos\theta\_{\pmb{x}\_2}}{\|\pmb{x}\_2-\pmb{x}\_1\|^2\_2}V(\pmb{x}\_1,\pmb{x}\_2)\,d\pmb{x}\_2$$

There is one small difference compared to the area formulation, and that is the fact that we have $L\_e$ in the integral and not $L$, so it is not a recursive integral anymore. It is still an integral however, which implies an infinite sum - this is currently not very fast to compute, unless you have specialized hardware like RTX, especially for more complex scenes. Note that the integral is over all surface points emitting light, so you would in general need to sum up the light coming from area lights, skyboxes etc.

So the next simplification that is usually done, is using point lights. Point lights have the computationally efficient property, that they are represented through [Dirac delta functions](https://en.wikipedia.org/wiki/Dirac_delta_function). A Dirac delta function, essentially allows you to get rid of the integral - the light comes only from a single direction. Then your integral turns into a finite sum over all point lights in the scene (a similar argument may be made for directional or spot lights, note that the light cosine term disappears, since informally there's no normal to speak of):

$$L(\pmb{x}\_0\leftarrow\pmb{x}\_1) = L\_e(\pmb{x}\_0\leftarrow\pmb{x}\_1) + \\ \sum\_{k=1}^{N}f\_r(\pmb{x}\_0\leftarrow\pmb{x}\_1\leftarrow\pmb{y}\_k)L\_k(\pmb{x}\_1\leftarrow\pmb{y}\_k)\frac{\cos\theta\_{\pmb{x}\_1}}{\|\pmb{y}\_k-\pmb{x}\_1\|^2\_2}V(\pmb{x}\_1,\pmb{y}\_k)$$

Where $L\_e$ is generally constant, $L\_k$ is the radiance of light source $k$ and $\pmb{y}\_k$ is the position of light source $k$. If your material is diffuse then $f\_r$ and the radiance of the point light do not change with directions, then $L\_i$ and $f\_r$ are also constant so you get the (possibly) familiar expression:

$$L = L\_e + \sum\_{k=1}^{N}f\_rL\_k\cos\theta\_k V(\pmb{x}\_1,\pmb{y}\_k)$$
$$color = emission + \sum\_{k=1}^{N}ObjectColor \* LightColor \* \cos\theta\_k \* VisibilityFromLight\\_k$$

The only thing that is usually not there is the $V$ term, since it requires tracing rays through the scene, which standard rasterization algorithms don't do. So it's either set to $1$, or replaced with information from a shadow map (for each summand the shadow map from this light's perspective ought to be used for semi-correct results). Often times the remaining terms that were cut off $T^2L\_e + T^3L\_e + ... + T^{\infty}L\_e$ are substituted with a constant ambient light term or with an ambient occlusion term.

Path tracing usually solves the rendering equation without any of the above simplifications (but requires a lot more computational power), that is the reason why images produced by it look so realistic.

Whole books may be written on this matter. But I hope I managed to clarify at least some things regarding Gouraud, Phong interpolation, shadows, and how all of this ties into the rendering equation.

> **Comments:**
> **username_2**: @Nikos I assume you understand the interpolation strategies in terms of how it works in practice? In practice (rasterized graphics) you do not get shadows, because you simply do not check whether there is an object between the point that you are shading and the light source (occlusion). In ray tracing you do check that, this corresponds to my comments about the visibility function $V(x,y)$ and how it is usually not present in rasterized graphics. Ray tracing and GI try to solve the equation without throwing away $V(x,y)$ and cutting the number of bounces to 1 (also more than point lights).  
> **username_2**: @Nikos It is in the answer: "Approximations, that do not produce shadows, have simply thrown away or modified that visibility function (one such modification is replacing V with the ambient occlusion or with information from a $\textbf{shadow map}$).". Shadow mapping is a technique which renders the depth as perceived by a light source in a texture, and then this is used to approximate $V(x,y)$. Note that this only works for point lights, and cannot be truly omnidirectional (it just renders the 6 faces of a cube). It is also limited by the resolution of the texture map.  

---

