<p>That completely depends on how you are computing the shading. If you are then just linearly interpolating the shaded colours across the triangle, i.e. <a href="https://en.wikipedia.org/wiki/Gouraud_shading">Gouraud shading</a> then, clearly, the answer is "no".</p>

<p>However, if you are doing per-pixel shading by, say, interpolating normals and light directions, then you can easily get a brighter area away from the vertices.</p>

CC BY-SA 3.0
2016-05-26T09:17:50.953Z
The second method is Phong shading model ? And could you elaborate more on how you conclude that in Gouraud Shading we cannot have brighter points and in the second method we can have brighter points ?
john john
CC BY-SA 3.0
2016-05-26T10:08:00.483Z
@johnjohn gouraud shading is taking a weighted average of the colors of the vertices. While with per pixel you can have a point light near the middle of a large surface. The vertices won't get much light but the middle should have a lot of light.
ratchet freak
CC BY-SA 3.0
2016-05-26T13:53:55.863Z
@johnjohn just to add to ratchet's comment, WRT Gouraud, just consider two points on a 2D graph where height represents brightness and connect them by a straight line segment. No point along the segment can be higher (i.e. brighter) than the higher end point.  If you consider the edges of your triangle it shows that no point on an edge can be brighter than the end vertices.  Now for any point inside the triangle just draw, say, a line through the point from edge to edge - the point inside can't be brighter.

With per-pixel shading, however, you don't have linear interpolation.
Simon F
CC BY-SA 3.0
2016-05-27T18:50:58.750Z
@SimonF So, to recap there are three methods of finding the brightness:
1) Firstly, calculate the dot product of normals and light vector for each vertex, then interpolate over triangle.
2) Interpolate normals then calculate the dot product with light vector for each point.
3) Interpolate gradient vectors then calculate the dot product with light vector.

From these methods, which can give brightness bigger than the vertices?
john john
CC BY-SA 3.0
2016-05-26T09:09:22.663Z
2016-05-26T09:09:22.663Z
Simon F
<p>Assuming you have almost any lighting model at all:</p>

<p>You cannot bound the view irradiance (light reflected from a surface location towards the eye/camera) by computing the irradiance at the vertices and bounding those, even if the surface is completely diffuse Lambertian and has no view-angle term.  </p>

<p>Imagine a large floor triangle, and a point lighting near the center of the triangle, close to the surface.  The center of the triangle is very bright, while the vertices - which are far away from the light source - are dark.</p>

<p>Alternatively, if you are just asking if a linearly interpolated quantity can exceed the value at any/all of the end points - then the answer is simply 'no' - your bounds are accurate. The key issue here is that irradiance is a non-linear function over the surface, but interpolation is linear</p>

CC BY-SA 3.0
2016-05-27T19:47:59.517Z
what if we assume a directional
light, whose direction does not depend on the position on the surface. What happens then ?
john john
CC BY-SA 3.0
2016-05-27T20:35:11.993Z
@johnjohn same thing, the view direction is still affected by the surface.
joojaa
CC BY-SA 3.0
2016-05-27T19:44:48.500Z
2016-05-27T19:44:48.500Z
GroverManheim
<p>I am supplementing the answer of others by adding a picture showing a Blinn and Lambert material applied to a triangle (the triangle has normals in different directions at the corners to show the difference in shading). There is one distant directional light in the scene.</p>

<p><a href="https://i.sstatic.net/8Ly97.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8Ly97.png" alt="Lighting on a triangle lit by directional light"></a>  </p>

<p><strong>Image 1</strong>: Image shows lighting on a triangle lit by directional light.  </p>

<p>By comparing the samples in image 1 we can see that the highest color value can be somewhere in the center of the triangle. Which shows that the assumption in your question is generally invalid. </p>

<p>So <strong>no</strong> you can not generally assume that the corners are the maximum of a triangle. A shader with this property can be constructed but quite a few shaders have this property naturally.</p>

CC BY-SA 3.0
2016-05-28T08:00:48.460Z
So there are three methods which you can find the brightness .
1) Firstly, calculate the dot product of normals and light vector for each vertex, then interpolate over triangle. 2) Interpolate normals then calculate the dot product with light vector for each point. 3) Interpolate gradient vectors then calculate the dot product with light vector. 

From these methods, which can give brightness bigger than the vertices?
john john
CC BY-SA 3.0
2016-05-28T08:03:34.127Z
@johnjohn 2 and 3. 1 is Gouraud shading that is hardly used anywhere anymore because it does not look correct.
joojaa
CC BY-SA 3.0
2016-05-28T08:07:32.857Z
So I assume from what you said that the **order** of interpolation (comes first in Gouraud Shading or comes second in the other methods) can lead to better shading results, only for the last two.
john john
CC BY-SA 3.0
2016-05-28T08:11:42.950Z
@johnjohn Gouraud shading is a trick to compensate for the fact that hardware was not fast enough for the job. Nobody even back whan it was conceived thought it was any good. (well obviously if you use Gouraud on a mesh that has one triangle per pixel theres no difference) Since the lightning is heavily dependent on where the local normal points it means that any method that is locally per pixel calculated can have hot spots in other than corners.
joojaa
CC BY-SA 3.0
2016-05-27T21:04:34.613Z
2016-05-28T14:58:48.403Z
2016-05-28T14:58:48.403Z
joojaa
<p>Let's assume that in a triangle we have computed the brightness on the vertices of a triangle and we have found that it is maximum. </p>

<p>Can any other point which lies on that triangle have more brightness than the maximum brightness on those vertices ?</p>

<shading><brightness>
Surface shading on an triangle
john john
# Surface shading on an triangle

(Asked by: username_0 on 2016-05-26)

Let's assume that in a triangle we have computed the brightness on the vertices of a triangle and we have found that it is maximum.

Can any other point which lies on that triangle have more brightness than the maximum brightness on those vertices ?

**Tags:** shading, brightness


---

## 3 answers

### Answer by username_1 on 2016-05-26. Score: 5

That completely depends on how you are computing the shading. If you are then just linearly interpolating the shaded colours across the triangle, i.e. [Gouraud shading](https://en.wikipedia.org/wiki/Gouraud_shading) then, clearly, the answer is "no".

However, if you are doing per-pixel shading by, say, interpolating normals and light directions, then you can easily get a brighter area away from the vertices.

> **Comments:**
> **username_0**: The second method is Phong shading model ? And could you elaborate more on how you conclude that in Gouraud Shading we cannot have brighter points and in the second method we can have brighter points ?  
> **username_2**: @username_0 gouraud shading is taking a weighted average of the colors of the vertices. While with per pixel you can have a point light near the middle of a large surface. The vertices won't get much light but the middle should have a lot of light.  
> **username_1**: @username_0 just to add to username_2's comment, WRT Gouraud, just consider two points on a 2D graph where height represents brightness and connect them by a straight line segment. No point along the segment can be higher (i.e. brighter) than the higher end point.  If you consider the edges of your triangle it shows that no point on an edge can be brighter than the end vertices.  Now for any point inside the triangle just draw, say, a line through the point from edge to edge - the point inside can't be brighter.  With per-pixel shading, however, you don't have linear interpolation.  
> **username_0**: @username_1 So, to recap there are three methods of finding the brightness: 1) Firstly, calculate the dot product of normals and light vector for each vertex, then interpolate over triangle. 2) Interpolate normals then calculate the dot product with light vector for each point. 3) Interpolate gradient vectors then calculate the dot product with light vector.  From these methods, which can give brightness bigger than the vertices?  

---

### Answer by username_3 on 2016-05-27. Score: 3

Assuming you have almost any lighting model at all:

You cannot bound the view irradiance (light reflected from a surface location towards the eye/camera) by computing the irradiance at the vertices and bounding those, even if the surface is completely diffuse Lambertian and has no view-angle term.

Imagine a large floor triangle, and a point lighting near the center of the triangle, close to the surface. The center of the triangle is very bright, while the vertices - which are far away from the light source - are dark.

Alternatively, if you are just asking if a linearly interpolated quantity can exceed the value at any/all of the end points - then the answer is simply 'no' - your bounds are accurate. The key issue here is that irradiance is a non-linear function over the surface, but interpolation is linear

> **Comments:**
> **username_0**: what if we assume a directional light, whose direction does not depend on the position on the surface. What happens then ?  
> **username_4**: @username_0 same thing, the view direction is still affected by the surface.  

---

### Answer by username_4 on 2016-05-27. Score: 1

I am supplementing the answer of others by adding a picture showing a Blinn and Lambert material applied to a triangle (the triangle has normals in different directions at the corners to show the difference in shading). There is one distant directional light in the scene.

[![Lighting on a triangle lit by directional light](https://i.sstatic.net/8Ly97.png)](https://i.sstatic.net/8Ly97.png)

**Image 1**: Image shows lighting on a triangle lit by directional light.

By comparing the samples in image 1 we can see that the highest color value can be somewhere in the center of the triangle. Which shows that the assumption in your question is generally invalid.

So **no** you can not generally assume that the corners are the maximum of a triangle. A shader with this property can be constructed but quite a few shaders have this property naturally.

> **Comments:**
> **username_0**: So there are three methods which you can find the brightness . 1) Firstly, calculate the dot product of normals and light vector for each vertex, then interpolate over triangle. 2) Interpolate normals then calculate the dot product with light vector for each point. 3) Interpolate gradient vectors then calculate the dot product with light vector.   From these methods, which can give brightness bigger than the vertices?  
> **username_4**: @username_0 2 and 3. 1 is Gouraud shading that is hardly used anywhere anymore because it does not look correct.  
> **username_0**: So I assume from what you said that the **order** of interpolation (comes first in Gouraud Shading or comes second in the other methods) can lead to better shading results, only for the last two.  
> **username_4**: @username_0 Gouraud shading is a trick to compensate for the fact that hardware was not fast enough for the job. Nobody even back whan it was conceived thought it was any good. (well obviously if you use Gouraud on a mesh that has one triangle per pixel theres no difference) Since the lightning is heavily dependent on where the local normal points it means that any method that is locally per pixel calculated can have hot spots in other than corners.  

---

