GRASS RENDERING in OpenGL // Code Review

https://www.youtube.com/watc...
Visit http://brilliant.org/TheCherno to get started learning STEM for free! The first 200 people will get 20% off their annual premium subscription. Patreon ► https://patreon.com/thecherno Instagram ► https://instagram.com/thecherno Twitter ► https://twitter.com/thecherno Discord ► https://discord.gg/thecherno Code ► https://github.com/SomePineaple/GLGrass Send an email to chernoreview@gmail.com with your source code, a brief explanation, and what you need help with/want me to review and you could be in the next episode of my Code Review series! Also let me know if you would like to remain anonymous. CHAPTERS 0:00 - Rendering lots of grass in OpenGL 2:55 - Diving into the code 10:12 - Instantiating objects in C++ vs C#/Java 11:35 - Shader class 12:12 - Variable naming conventions 13:25 - Initializing variables 15:03 - Some notes on strings 15:30 - Pass larger types by const reference 16:45 - Using correct types 17:48 - Strings in C++ and std::string_view 20:48 - .obj format 22:38 - Grass mesh 23:44 - Rendering meshes 24:24 - General notes and C++ code style 25:35 - Grass rendering and shaders 26:32 - Handling a time variable for shaders 27:14 - Storage buffers in OpenGL 28:25 - Reduce complexity in hot code paths 29:00 - How grass is actually rendered 29:50 - Grass vertex shader 32:11 - Use mat3 instead of mat4 33:13 - Reduce vertex shader complexity 34:22 - Don't reallocate GPU buffers 35:28 - Inspecting rendering using Nvidia Nsight 37:13 - Set buffer data instead of reallocating 39:36 - Grass fragment shader + improvements 41:46 - Adding variance to grass blade color This video is sponsored by Brilliant. #CodeReview
Home
/
Indie Game Developers
/
The Cherno
/
GRASS RENDERING in OpenGL // Code Review