Add notes

This commit is contained in:
Nathan Chapman 2025-06-30 14:56:38 -06:00
parent d7044f7352
commit cc15bbab1f

30
src/notes.txt Normal file
View File

@ -0,0 +1,30 @@
First we start with a vertex shader.
There are a couple of intermediary processes that have to go into this, but this is good for our puposes.
Then we do Vertex Post-Processing.
Then we do primitive assembly.
Face culling (every face away will be removed).
Rasterization: convert primitives to fragments: not quite pixels, the values are interpolated
Fragment shader: Is where we can output color. Lighting, shadows.
Per-sample operations: series of thests to see if the fragment should be drawn.
Most important test is the depth test for shadows.
The most important shaders: Vertex and Fragment.
Origin of shaders. Shader programs are a group of shaders (Vertex, Tessellation, Geometry, Fragment...) associated with one another.
They are created in OpenGL with functions.
Creating a Shader program
1. Create an empty program
- glUseProgram(shader_id)
-
2. Create empty shaders
3. Attach shader source code to shaders.
4. Compile shaders.
5. Attach shaders to program.
6. Link program (creates executables from shaders and links them together).
7. Validate program (because things run on the GPU it's harder to debug).