Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Diffuse Lighting // OpenGL Tutorial #20 в хорошем качестве

Diffuse Lighting // OpenGL Tutorial #20 2 года назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Diffuse Lighting // OpenGL Tutorial #20

In this video we will learn how to implement diffuse lighting which is the second type of light in the Phong Reflection Model. We've covered ambient lighting in the previous tutorial and specular lighting will be covered in the next one. In this tutorial I have used the following public domain assets: Wine barrel model - https://polyhaven.com/a/wine_barrel_01 by James Ray Cock Terrain texture - https://polyhaven.com/a/aerial_rocks_02 by Rob Tuytel Thanks a lot to James and Rob for providing their creations! Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at    • OpenGL for Beginners   Please visit https://ogldev.org to see more of my tutorials on modern OpenGL. Link to source: https://github.com/emeiri/ogldev/blob... If you want to get the same version that was used in the video checkout the tag TUT_20_DIFFUSE_LIGHTING. OpenGL 4.6 specification: https://www.khronos.org/registry/Open... Timecodes: 0:00 Intro 0:57 Light sources types 3:02 The diffuse light factor 3:51 Lambert’s Cosine Law 4:33 Diffusely reflecting surface 5:10 The surface normal 6:11 Calculating the diffuse factor 7:29 Surface vs Vertex normals 9:00 Transforming the normal 10:27 Diffuse lighting in local space 11:05 Generating the world-to-local matrix 12:37 Code Review 12:45 Step 1: Add a diffuse component to the material 13:36 Step 2: Create a directional light with a diffuse component 14:50 Step 3: Calculate the light direction in local space 16:01 Step 4: Add uniform locations for shader diffuse params 16:37 Step 5: Add vertex normal to the vertex shader 17:22 Step 6: Implement diffuse lighting in the fragment shader 19:39 Step 7: Minor changes to the main app code 20:17 Test and experiment Feel free to comment below. Email: [email protected] Github: https://github.com/emeiri/ogldev.git Twitter: @ogldev One time donations (Paypal): https://ogldev.org/donate.html Patreon:   / ogldev   Credits: Music - "Small Guitar" from https://bensound.com Duke Nukem image - https://www.cleanpng.com/png-duke-nuk... Johann Heinrich Lambert pic - https://en.wikipedia.org/wiki/Johann_... Cosine pic - https://upload.wikimedia.org/wikipedi... Enjoy, Etay Meiri #opengl #ogldev #opengtutorials

Comments