From cc15bbab1fd00667ff5efc3a19fbe2216445a5bd Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Mon, 30 Jun 2025 14:56:38 -0600 Subject: [PATCH] Add notes --- src/notes.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/notes.txt diff --git a/src/notes.txt b/src/notes.txt new file mode 100644 index 0000000..4a9ac7d --- /dev/null +++ b/src/notes.txt @@ -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). +