Difference between revisions of "3D Fundamentals Tutorial 9"
From Chilipedia
(→Video) |
(→Video) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
:* Inside the PutPixel function, we want to call a shader object that defines the coloring behavior | :* Inside the PutPixel function, we want to call a shader object that defines the coloring behavior | ||
</div> | </div> | ||
− | * Implementation of the programmable Pixel Shader in the pipeline [https://youtu.be/pef2405M-os?t=3m11s 3:11] | + | * Implementation of the programmable Pixel Shader in the rendering pipeline [https://youtu.be/pef2405M-os?t=3m11s 3:11] |
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
:* We template the pipeline class on an <code><class Effect></code> | :* We template the pipeline class on an <code><class Effect></code> | ||
Line 45: | Line 45: | ||
{...} | {...} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | :* Coding the scene class < | + | :* Coding the scene class <code>CubeVertexColorScene.h</code> [https://youtu.be/pef2405M-os?t=14m13s 14:13] |
</div> | </div> | ||
* Making a new <code>Effect</code>: Solid Colors [https://youtu.be/pef2405M-os?t=14m47s 14:47] | * Making a new <code>Effect</code>: Solid Colors [https://youtu.be/pef2405M-os?t=14m47s 14:47] | ||
Line 55: | Line 55: | ||
:* Adding a static function <code>GetPlainIndependentFaces()</code> to <code>Cube.h</code> to get the 24 vertices [https://youtu.be/pef2405M-os?t=18m15s 18:15] | :* Adding a static function <code>GetPlainIndependentFaces()</code> to <code>Cube.h</code> to get the 24 vertices [https://youtu.be/pef2405M-os?t=18m15s 18:15] | ||
:* Demo [https://youtu.be/pef2405M-os?t=19m19s 19:19] | :* Demo [https://youtu.be/pef2405M-os?t=19m19s 19:19] | ||
− | </ | + | </div> |
− | * Reflections on | + | * Reflections on our approach to Pixel Shading [https://youtu.be/pef2405M-os?t=19m58s 19:58] |
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
:* With our approach, the sky is the limit in terms of adding options/effects to the Pixel Shader | :* With our approach, the sky is the limit in terms of adding options/effects to the Pixel Shader |
Latest revision as of 04:28, 4 June 2020
In this tutorial we incorporate our first shader stage into the 3D pipeline: the pixel shader stage. We also explore some basic example pixel shaders (more heavy-duty stuff to come later).
Video
The tutorial video is on YouTube here.
[Expand]
- What is a Pixel Shader and why is it used? 0:20
- Refactoring of the
gfx.PutPixel(...)
function inPipeline.h
2:04
- Implementation of the programmable Pixel Shader in the rendering pipeline 3:11
- Making a new
Effect
: Color Blending 8:31
- Making a new
Effect
: Solid Colors 14:47
- Reflections on our approach to Pixel Shading 19:58
Downloads
The GitHub repository for the tutorial code is here.