Тёмный

OpenGL - lighting with the Phong reflection model (part 2 of 2) 

Brian Will
Подписаться 95 тыс.
Просмотров 15 тыс.
50% 1

Code samples derived from work by Joey de Vries, @joeydevries, author of learnopengl.com/
All code samples, unless explicitly stated otherwise, are licensed under the terms of the CC BY-NC 4.0 license as published by Creative Commons, either version 4 of the License, or (at your option) any later version.

Опубликовано:

 

19 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@abhishektyagi4624
@abhishektyagi4624 3 года назад
Thank you will.
@glowiever
@glowiever 3 года назад
specular strength > 1 means the model is not conserving energy right?
@miko-puk-puk
@miko-puk-puk 3 года назад
Right, the result light value might be greater than the source light value.
@Zentennen
@Zentennen 3 года назад
What's the advantage of computing the inverse transpose of the model matrix in the vertex shader as opposed to on the cpu? We could have a uniform normal matrix instead that gets passed in cpu-side.
@isaiahche1214
@isaiahche1214 3 года назад
You are right. The inverse and transpose functions can be really costly on the shader-side, but because this is for demonstration purposes, I'm assuming that he just went ahead and did it in the vertex shader.
@zzador
@zzador 2 года назад
4:10 You might have used the wrong function here. I think you wanted to use the "pow(x, y)" function here and not the "exp(x)" function that only takes one argument. specular = pow(max(dot(R, C), 0), k) * lightColor
@MrDjRayner
@MrDjRayner 4 года назад
If anyone is a bit lost, or just stumbled on this video and is not following the video series I'd recommend watching the following video first, /watch?v=nS3qwFOPieg, and then coming back to watch this video.
@anonymousdog7851
@anonymousdog7851 2 года назад
How does the reflect() formula work?
@MrTomyCJ
@MrTomyCJ 6 дней назад
You give it a vector with a certain direction (representing an incoming light ray), the inclination of the surface it will bounce on (represented by its normal vector), and it gives you a vector with the direction that the reflected light ray would have. You can figure out the formula using some geometry and the fact the reflected angle equals the incoming angle, and the reflect() function applies that formula internally.
@Byynx
@Byynx 11 месяцев назад
Can someone explain why specular light usually has "halo" effect. what's the logic?
@thesituation5315
@thesituation5315 Год назад
Hi. Do you know how to make this work in 2D?
@MrMariozzz78
@MrMariozzz78 2 месяца назад
i use opegl in dev c++ gl library i guess it pre 2.0 so it dont use GLSL ...can i use phong light with 2.0 pre.version?
@MrMariozzz78
@MrMariozzz78 Месяц назад
i try this source code with basic light ,my pc gpu go for 100 % usage ,,,,no good programming
@truongvantam4994
@truongvantam4994 Год назад
please give me the source code of this video
Далее
OpenGL - gamma correction, HDR tone mapping, bloom
15:26
OpenGL - shadow maps (for directional lights)
17:32
Просмотров 22 тыс.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Coding a Web Server in 25 Lines - Computerphile
17:49
Просмотров 328 тыс.
OpenGL - model transform and projection
14:38
Просмотров 7 тыс.
Introduction to shaders: Learn the basics!
34:50
Просмотров 302 тыс.
OpenGL - transparency (alpha blending)
16:43
Просмотров 12 тыс.
37C3 -  Breaking "DRM" in Polish trains
1:01:46
Просмотров 431 тыс.
OpenGL - PBR (physically based rendering)
12:47
Просмотров 30 тыс.