Assignment Group 6: Shaders and Graphics Hardware
The real learning goal of this topic is to understand how the graphics hardware works, and how we can program it.
We need to know how the hardware works so that we can use it effectively (it will explain why some things seem weird). We also need to understand the graphics hardware so we can program it (write Shaders). Let me stress: shader programming won’t make sense unless you understand the graphics hardware.
In practice, this is becoming less important: the high level APIs (such as THREE) have written really good, flexible shaders - so the reasons to write your own are less common (the big ones are procedural textures and special effects).
Key Deadline: Content Survey 6: Shaders (due Wed, Apr 02) (note this is for Tuesday’s class)
Key Deadline: Workbook Drafts 6: Shaders (due Wed, Apr 02) (note this is for Thursday’s class)
There is only one workbook for this assignment - but the “GraphicsTown Workbook” (which will effectively be a Portfolio) will come immediately after.
Workbook 10 provides a tutorial on shader programming. Link on Canvas.
The workbook points to some other resources for examples (which you should look at for inspiration, and also because you are required to copy one). It also provides some (old) resources for shader programming.
The lectures (video recordings) are a great resource. We discuss more than just shader basics - the lectures include some of the history that will hopefully help you understand why things are the way that they are.
The videos (all from 2023):
- [Thu 4/6] Drawing in 3D - covers how the graphics hardware works in terms of algorithms (after a review of texture mapping). Important to understand the algorithms that are being used.
- [Tue 4/11] - talks about the graphics pipeline in terms of how the pieces fit together, and where shaders fit in. It tries to get to shaders as fast as possible. (in 2023, there was less “history of the pipeline”). It explains shader basics.
- [Thu 4/13] - talks about more aspects of shaders. It gives some explanations and details for the examples in the workbooks, and has some newer examples.
- Aliasing - is a whole lecture devoted to aliasing. We’ll deal with it a little with shaders, and probably talk about it more later in the semester. It is one of the most important topics in computer graphics. (note: this isn’t a full lecture)
- Shaders and Noise - a “mini lecture” on using randomness in Shaders. Important - since you need randomness to make interesting shaders.
While it’s not a video (I didn’t record myself live coding), you can see the results of me trying to make a wood texture at: https://pages.graphics.cs.wisc.edu/559-sp23/posts/wood/
Requirements
You should watch the videos and read through the workbooks. And to show that you understand the programming parts you should do:
- Do the three boxes on page 10-09 (10-09-01, 02 and 03). These build on earlier pages, so you will probably end up doing those as practice.
- Do something for 10-10-01. (adapt a shader for the framework). This is good practice.
We’ll probably do 10-07-02 in class (it’s a good exercise).
You will need to write at least one Shader for the 3rd Portfolio (Graphics Town Workbook).