Difference between revisions of "3D Fundamentals Tutorial 9"
From Chilipedia
(→Video) |
|||
Line 4: | Line 4: | ||
The tutorial video is on YouTube [https://youtu.be/pef2405M-os here]. | The tutorial video is on YouTube [https://youtu.be/pef2405M-os here]. | ||
+ | |||
+ | <div class="mw-collapsible mw-collapsed"><br /> | ||
+ | * What is a Pixel Shader and why is it used? [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | <div class="mw-collapsible-content"> | ||
+ | :* We want to make color mapping of the triangles in the rendering pipeline configurable | ||
+ | :* One way is to use templated function objects (functors) as "plug-in" code | ||
+ | :* These functors determine the color of the pixel based on their input | ||
+ | </div> | ||
+ | * Refactoring of the <code>gfx.PutPixel(...)</code> function in <code>Pipeline.h<code> [https://youtu.be/pef2405M-os?t=2m04s 2:04] | ||
+ | |||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | * ... [https://youtu.be/pef2405M-os?t=0m20s 0:20] | ||
+ | |||
+ | </div> | ||
== Downloads == | == Downloads == |
Revision as of 19:38, 1 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.
- What is a Pixel Shader and why is it used? 0:20
- We want to make color mapping of the triangles in the rendering pipeline configurable
- One way is to use templated function objects (functors) as "plug-in" code
- These functors determine the color of the pixel based on their input
- Refactoring of the
gfx.PutPixel(...)
function inPipeline.h<code> 2:04
</div>
Downloads
The GitHub repository for the tutorial code is here.