AEJuice Free Plugins https://aejuice.com/free-plugins/?ref...
AEJuice I Want It All Bundle https://aejuice.com/product/i-want-it...
AEJuice YouTube Channel / @aejuice
In this video we will study how the rasterizer interpolates vertex attributes that have different values in each vertex of the triangle (e.g. color). Spoiler: it uses Barycentric Coordinates so we will see how these work.
Please visit https://ogldev.org to see more of my tutorials on modern OpenGL.
Link to source: https://github.com/emeiri/ogldev/tree...
If you want to get the same version that was used in the video checkout the tag TUT_09_VERTEX_ATTRIB.
Visual Studio solution: ogldev/Windows/ogldev_vs_2022/ogldev_vs_2022.sln
The code for this tutorial is based on the Scaling tutorial. If you are not familiar with the code make sure you watch this first: • Scaling Transformation // OpenGL Tut...
OpenGL 4.6 specification: https://www.khronos.org/registry/Open...
🔥 I'm using the following books as background information for my tutorials and I highly recommend them for learning more about OpenGL and Vulkan.
These are affiliate links so if you use them to buy the books the price is the same for you and I will get a small commision (thank-you!).
📖 OpenGL 4 Shading Language Cookbook - Third Edition: Build high-quality, real-time 3D graphics with OpenGL 4.6, GLSL 4.6 and C++17 3rd ed. Edition: https://amzn.to/3XO2J3S
📖 3D Graphics Rendering Cookbook: A comprehensive guide to exploring rendering algorithms in modern OpenGL and Vulkan: https://amzn.to/3MMJQbf
(Watch my short video review on this book: • The 2nd book I'm using for my Vulkan ... )
📖 Vulkan Programming Guide: The Official Guide to Learning Vulkan: https://amzn.to/3XwBjhr
(Watch my short video review on this book: • The book I'm using for my Vulkan seri... )
Timecodes
0:00 Intro
0:18 Background
1:54 Interpolating between two points
3:42 Interpolating in the triangle
4:34 Barycentric coordinates
5:29 Using barycentric coordinates for interpolation
6:14 Calculating barycentric coordinates
7:23 Interpolation in the OpenGL spec
8:06 Code review
13:00 Conclusion
Feel free to comment below.
** Contact me:
Email: [email protected]
Facebook: / ogldev-188319114585587
GIthub: https://github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): https://ogldev.org/donate.html
Patreon: / ogldev
** Credits:
Music: "Sunny" from https://bensound.com
Ladder image: Hand vector created by upklyak - https://www.freepik.com/vectors/hand
Enjoy,
Etay Meiri
#opengl #ogldev #opengtutorials