Skip to content

Commit c8c61df

Browse files
committed
Clarity “At this point it is useful to think of the fragment (…)”
Improved clarity of the vertex-by-vertex / fragment-by-fragment analogy.
1 parent cb5b0a3 commit c8c61df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

content/static/tutorials/pshader/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ <h3>What is a Shader?</h3>
8787
<p>
8888

8989
<p>
90-
The output of the rasterization and interpolation stage are the pixel positions (x,y), together with their color (and optionally other variables that can be defined in the shader, we will cover this a few paragraphs later). This information (position, color, and other per-pixel variables) is called a fragment. The fragments are processed in the next stage, called the fragment shader. In this particular example, the fragment shader doesn't do much, it only writes the color to the screen position (x, y). At this point it is useful to think, in the same way we think of the vertex shader as operating on each input vertex at the time, of the fragment shader as operating on each fragment coming down the pipeline at the time, and then outputting the color of the fragment to the screen. As a way to see this more clearly, we could imagine the vertex shader as a "function" that is called inside the loop that runs over all the input vertices. We could write in pseudo-code:
90+
The output of the rasterization and interpolation stage are the pixel positions (x,y), together with their color (and optionally other variables that can be defined in the shader, we will cover this a few paragraphs later). This information (position, color, and other per-pixel variables) is called a fragment. The fragments are processed in the next stage, called the fragment shader. In this particular example, the fragment shader doesn't do much, it only writes the color to the screen position (x, y). At this point it is useful to think of the fragment shader as operating on each fragment coming down the pipeline at the time — in the same way we think of the vertex shader as operating on each input vertex at the time and then outputting the color of the fragment to the screen. As a way to see this more clearly, we could imagine the vertex shader as a "function" that is called inside the loop that runs over all the input vertices. We could write in pseudo-code:
9191
</p>
9292

9393
<pre>

0 commit comments

Comments
 (0)