<p>It is true to on today's GPUs, unless one or more vendors has implemented a technique such as this:
<a href="http://graphics.stanford.edu/papers/fragmerging/shade_sig10.pdf" rel="nofollow">http://graphics.stanford.edu/papers/fragmerging/shade_sig10.pdf</a></p>

<p>To clarify, rasterization is not being done multiple times, or redundantly - rather it is the shading work that is done redundantly. Each 2x2 quad will be shaded once for every triangle that covers at least one sub pixel sample in that 2x2 quad. So, for 4x MSAA, that could be as many as 16 times if every sample covers a different (very small) triangle.</p>

CC BY-SA 3.0
2016-05-18T03:34:20.290Z
2016-05-18T03:34:20.290Z
GroverManheim
<blockquote>
  <p>That's why the seam between two triangles can be rasterized twice.</p>
</blockquote>

<p>The seam won't be <em>rasterized</em> twice because of the OpenGL or D3D fill/rasterisation rules. </p>

<p>What I think Humus is alluding to is that a fragment shader may be executed multiple times on pixels spanning the shared edge, which just implies wasted effort.</p>

<p>The moral of the story is "avoid small or long/thin triangles if you want efficient rendering".</p>

CC BY-SA 3.0
2016-05-17T16:55:41.177Z
Enabling GL_POLYGON_SMOOTH would cause multiple rasterization.
Andreas
CC BY-SA 3.0
2016-05-17T15:45:12.903Z
2016-05-17T15:45:12.903Z
Simon F
<p>I know that fragments are rasterized in a 2x2 quad. That's why the seam between two triangles can be rasterized twice. At least <a href="http://www.humus.name/index.php?page=Comments&amp;ID=228" rel="nofollow">that article</a> states this. I wonder is it still true today on modern hardware?</p>

CC BY-SA 3.0
2016-05-17T10:16:01.747Z
Exactly how do you "know" that? Reference maybe?
Andreas
CC BY-SA 3.0
2016-05-17T10:44:45.463Z
@Andreas the linked article states this, although doesn't provide a reference. However, it does provide evidence that this affects performance, unless that can be explained in terms of some other cause.
trichoplax is on Codidact now
CC BY-SA 3.0
2016-05-17T10:47:51.343Z
@trichoplax My bad. Did not read question properly.
Andreas
CC BY-SA 3.0
2016-05-17T10:48:44.857Z
Also I saw several times that instead of fullscreen quad people use big triangle that covers the screen.
nikitablack
CC BY-SA 3.0
2016-05-17T11:17:57.233Z
@trichoplax I saw this explanation several times. For example https://www.reddit.com/r/gamedev/comments/2j17wk/a_slightly_faster_bufferless_vertex_shader_trick/.
nikitablack
CC BY-SA 3.0
2016-05-17T11:20:34.220Z
@nikitablack Oh I see - I thought you meant 2 triangles instead of a quad - but you mean 1 oversized triangle that encompasses the whole screen. That's interesting. I apologise - that is very much related to this question :)
trichoplax is on Codidact now
<rasterizer>
Double rasterization work on triangles edges.
nikitablack
# Double rasterization work on triangles edges.

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

I know that fragments are rasterized in a 2x2 quad. That's why the seam between two triangles can be rasterized twice. At least [that article](http://www.humus.name/index.php?page=Comments&ID=228) states this. I wonder is it still true today on modern hardware?

**Tags:** rasterizer

> **Comments:**
> **username_1**: Exactly how do you "know" that? Reference maybe?  
> **username_2**: @username_1 the linked article states this, although doesn't provide a reference. However, it does provide evidence that this affects performance, unless that can be explained in terms of some other cause.  
> **username_1**: @username_2 My bad. Did not read question properly.  
> **username_0**: Also I saw several times that instead of fullscreen quad people use big triangle that covers the screen.  
> **username_0**: @username_2 I saw this explanation several times. For example https://www.reddit.com/r/gamedev/comments/2j17wk/a_slightly_faster_bufferless_vertex_shader_trick/.  
> **username_2**: @username_0 Oh I see - I thought you meant 2 triangles instead of a quad - but you mean 1 oversized triangle that encompasses the whole screen. That's interesting. I apologise - that is very much related to this question :)  

---

## 2 answers

### Answer by username_3 on 2016-05-18. Score: 3 | Accepted answer

It is true to on today's GPUs, unless one or more vendors has implemented a technique such as this:
<http://graphics.stanford.edu/papers/fragmerging/shade_sig10.pdf>

To clarify, rasterization is not being done multiple times, or redundantly - rather it is the shading work that is done redundantly. Each 2x2 quad will be shaded once for every triangle that covers at least one sub pixel sample in that 2x2 quad. So, for 4x MSAA, that could be as many as 16 times if every sample covers a different (very small) triangle.


---

### Answer by username_4 on 2016-05-17. Score: 4

> That's why the seam between two triangles can be rasterized twice.

The seam won't be *rasterized* twice because of the OpenGL or D3D fill/rasterisation rules.

What I think Humus is alluding to is that a fragment shader may be executed multiple times on pixels spanning the shared edge, which just implies wasted effort.

The moral of the story is "avoid small or long/thin triangles if you want efficient rendering".

> **Comments:**
> **username_1**: Enabling GL_POLYGON_SMOOTH would cause multiple rasterization.  

---

