Triangle Rasterization
This video is an introduction to how triangle rasterization works.
We'll start by discussing a parallel algorithm for polygon rasterization based on an article written by Juan Pineda in 1988. We'll review the basic algorithm and implement a simple version using C & SDL.
But more than just a simple rasterizer, we'll cover some other important ideas in this video:
- Rasterization rules (top-left fill convention)
- Subpixel precision
- Interpolation using barycentric coordinates
- Some simple rasterizer optimizations
Chapters:
00:00:00 Introduction
00:05:48 Scanline rasterizer
00:11:07 Pineda's rasterization algorithm
00:11:24 Sources & inspiration
00:13:34 High-level overview of our rasterization algorithm
00:18:30 Initial code overview
00:31:44 Compiling our code
00:34:12 Defining if a point is inside a triangle
00:57:34 Fill convention (top-left rasterization rule)
01:11:56 Barycentric coordinates
01:31:23 Avoiding computing the edge function per-pixel
01:50:32 Rotating our triangles
01:56:58 Subpixel precision
02:11:37 Conclusion & next steps
Download the initial boilerplate code:
https://github.com/gustavopezzi/sdl-rasterizer
Triangle rasterizer code (integer):
https://github.com/gustavopezzi/triangle-rasterizer-int
Triangle rasterizer code (float):
https://github.com/gustavopezzi/triangle-rasterizer-float
Triangle rasterizer code (16.16 fixed-point):
https://github.com/gustavopezzi/triangle-rasterizer-fix16
Juan Pineda's parallel rasterization article:
https://www.cs.drexel.edu/~david/Classes/Papers/comp175-06-pineda.pdf
Fabian Giesen's article on triangle rasterization:
https://fgiesen.wordpress.com/2013/02/06/the-barycentric-conspirac/
Kristoffer Dyrkorn's article on triangle rasterization:
https://kristoffer-dyrkorn.github.io/triangle-rasterizer/
Bastian Molkenthin's article on triangle rasterization:
http://www.sunshine2k.de/coding/java/TriangleRasterization/TriangleRasterization.html
Gabriel Gambetta's article on triangle rasterization:
https://gabrielgambetta.com/computer-graphics-from-scratch/07-filled-triangles.html
For comprehensive courses on computer science, retro programming, and mathematics, visit: http://www.pikuma.com.
Also, don't forget to subscribe to receive updates and news about new lectures and tutorials:
https://www.youtube.com/channel/UC8GR0g1deJB_gxWxi_vuxhA?sub_confirmation=1
Enjoy!
Видео Triangle Rasterization канала pikuma
We'll start by discussing a parallel algorithm for polygon rasterization based on an article written by Juan Pineda in 1988. We'll review the basic algorithm and implement a simple version using C & SDL.
But more than just a simple rasterizer, we'll cover some other important ideas in this video:
- Rasterization rules (top-left fill convention)
- Subpixel precision
- Interpolation using barycentric coordinates
- Some simple rasterizer optimizations
Chapters:
00:00:00 Introduction
00:05:48 Scanline rasterizer
00:11:07 Pineda's rasterization algorithm
00:11:24 Sources & inspiration
00:13:34 High-level overview of our rasterization algorithm
00:18:30 Initial code overview
00:31:44 Compiling our code
00:34:12 Defining if a point is inside a triangle
00:57:34 Fill convention (top-left rasterization rule)
01:11:56 Barycentric coordinates
01:31:23 Avoiding computing the edge function per-pixel
01:50:32 Rotating our triangles
01:56:58 Subpixel precision
02:11:37 Conclusion & next steps
Download the initial boilerplate code:
https://github.com/gustavopezzi/sdl-rasterizer
Triangle rasterizer code (integer):
https://github.com/gustavopezzi/triangle-rasterizer-int
Triangle rasterizer code (float):
https://github.com/gustavopezzi/triangle-rasterizer-float
Triangle rasterizer code (16.16 fixed-point):
https://github.com/gustavopezzi/triangle-rasterizer-fix16
Juan Pineda's parallel rasterization article:
https://www.cs.drexel.edu/~david/Classes/Papers/comp175-06-pineda.pdf
Fabian Giesen's article on triangle rasterization:
https://fgiesen.wordpress.com/2013/02/06/the-barycentric-conspirac/
Kristoffer Dyrkorn's article on triangle rasterization:
https://kristoffer-dyrkorn.github.io/triangle-rasterizer/
Bastian Molkenthin's article on triangle rasterization:
http://www.sunshine2k.de/coding/java/TriangleRasterization/TriangleRasterization.html
Gabriel Gambetta's article on triangle rasterization:
https://gabrielgambetta.com/computer-graphics-from-scratch/07-filled-triangles.html
For comprehensive courses on computer science, retro programming, and mathematics, visit: http://www.pikuma.com.
Also, don't forget to subscribe to receive updates and news about new lectures and tutorials:
https://www.youtube.com/channel/UC8GR0g1deJB_gxWxi_vuxhA?sub_confirmation=1
Enjoy!
Видео Triangle Rasterization канала pikuma
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Creating a Game Loop with C & SDL (Tutorial)](https://i.ytimg.com/vi/XfZ6WrV5Z7Y/default.jpg)
![My Top-3 (Retro) Linux Distros](https://i.ytimg.com/vi/pg8EX1T1It8/default.jpg)
![Verlet Integration](https://i.ytimg.com/vi/-GWTDhOQU6M/default.jpg)
![Voxel Space (Comanche Terrain Rendering)](https://i.ytimg.com/vi/bQBY9BM9g_Y/default.jpg)
![How C++ Vector Works](https://i.ytimg.com/vi/TaySu61K6dI/default.jpg)
![How Retro Video Game Graphics Work](https://i.ytimg.com/vi/AafpFLWDoEw/default.jpg)
![Linear Collision Resolution in 2D Game Physics](https://i.ytimg.com/vi/1L2g4ZqmFLQ/default.jpg)
![Tools to make a Game Engine in C++](https://i.ytimg.com/vi/qK-GTuhZwUg/default.jpg)
![3D Software Rendering Graphics Pipeline](https://i.ytimg.com/vi/7qUuzRY5YwI/default.jpg)
![Vector Rotation (Derivation & Geometric Proof)](https://i.ytimg.com/vi/tEUpWgy-Tuo/default.jpg)
![Perspective Projection Matrix (Math for Game Developers)](https://i.ytimg.com/vi/EqNcqBdrNyI/default.jpg)
![Matrix Multiplication (A Simple Review)](https://i.ytimg.com/vi/UG530eh8q4A/default.jpg)
![Collision Detection with SAT (Math for Game Developers)](https://i.ytimg.com/vi/-EsWKT7Doww/default.jpg)
![Math for Game Developers: Fundamentals of Calculus](https://i.ytimg.com/vi/ertWmgkdkiE/default.jpg)
![Why do we use SDL with C & C++?](https://i.ytimg.com/vi/LrTZmRV8Oik/default.jpg)
![C++ Objects: Stack vs. Heap](https://i.ytimg.com/vi/PCnDoknVFK4/default.jpg)
![Math for Game Developers: Why do we use 4x4 Matrices in 3D Graphics?](https://i.ytimg.com/vi/Do_vEjd6gF0/default.jpg)
![Introduction to Object-Oriented Programming with Lua](https://i.ytimg.com/vi/i5tNVr4P_cw/default.jpg)
![Installing Lua on Windows Terminal & VS Code](https://i.ytimg.com/vi/XCwXWOe6VcU/default.jpg)
![How to link SDL 2 with Visual Studio on Windows (2021)](https://i.ytimg.com/vi/tmGBhM8AEj8/default.jpg)