OpenGL - shadow maps (for directional lights)

  Рет қаралды 21,528

Brian Will

Brian Will

4 жыл бұрын

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.

Пікірлер: 22
@phyyl
@phyyl 3 жыл бұрын
So clear! Thanks a lot for the video.
@ciberman
@ciberman 3 жыл бұрын
Amazing explanation! Very clear!
@iamarugin
@iamarugin 6 ай бұрын
This was a brilliant explanation, thank you very much!
@DMmaster335
@DMmaster335 2 жыл бұрын
Increadable explenation, big ups
@Vagelis_Prokopiou
@Vagelis_Prokopiou 4 жыл бұрын
Very nice stuff dear Brian. Thanks!
@retroscooter2119
@retroscooter2119 3 жыл бұрын
Hi linux pingu
@Vagelis_Prokopiou
@Vagelis_Prokopiou 3 жыл бұрын
@@retroscooter2119 hi to you too.
@KropedStudio
@KropedStudio 7 ай бұрын
@@Vagelis_Prokopiou yo
@nandukrishna8142
@nandukrishna8142 2 жыл бұрын
This video truly needs more likes and comments 🙁
@cmedia425
@cmedia425 7 ай бұрын
Since this is for directional lights why is there a lightPosition variable needed for the glm::lookat function? My interpretation of the directional light was that it only needed a direction.
@andrewh111
@andrewh111 4 жыл бұрын
sooo shadow volumes next?
@ps_lol
@ps_lol 4 жыл бұрын
Hi can you help me on shadow mapping pleasee for 330 version
@cmdlp4178
@cmdlp4178 4 жыл бұрын
Is there a good way to calculate shadows (without using a temporary buffer), which consists of only the triangles projected on each other triangle?
@briantwill
@briantwill 4 жыл бұрын
Self-shadowing of a model without constructing a shadow map or shadow volume? Only other option I'm aware of is ray-casting.
@cmdlp4178
@cmdlp4178 4 жыл бұрын
@@briantwill I heard/read about a game engine, which does the shadow calculations on the CPU. It projects each triangle onto other triangles, it splits each triangle into dark and light triangles and simply sends these to the GPU and renders these. No shaders needed. I think this was done years ago, before shaders even were added to OpenGL. But I forgot where I heard/read about it and how the engine was called
@briantwill
@briantwill 4 жыл бұрын
@@cmdlp4178 Huh, that kinda sounds like shadow volumes, but probably less efficient. Doesn't seem like it would scale well for today's typical triangle counts.
@cmdlp4178
@cmdlp4178 4 жыл бұрын
@@briantwill this could be a good topic for a video
@RJC65__
@RJC65__ 3 жыл бұрын
I really don't know why my code isnt working, when I got up to the point of where you had shadow acne, I didn't have any shadow acne and my shadows are all random and no where near the correct places they should be, I made sure to follow your code exactly, any reasons why this is happening?
@douggale5962
@douggale5962 2 жыл бұрын
Do you create a debug rendering context? It helps, a lot, with that kind of issue. If it goes nuts, most likely there is a call with an invalid parameter somewhere, a properly initialized debug context will report it. Really check your matrix code, make sure you are transposing or not, as appropriate. Vector multiplication with a matrix is not commutative, the order of multiplication makes a huge difference.
@WowPlusWow
@WowPlusWow 3 жыл бұрын
The explanation you gave at 11:45 makes no sense. How would the z coordinate of the position relative to the light be higher than 1 when we multiplied it by the view matrix, effectively converting it into NDC space, which ranges from [-1,1]???
@WowPlusWow
@WowPlusWow 3 жыл бұрын
It's because of the fragments that extend beyond the frustum of the orthographic projection.
@Al-Hebri
@Al-Hebri 3 жыл бұрын
Please I need a link to the code to revise my code because I have a problem here
Interactive Graphics 16 - Shadow Mapping
1:06:47
Cem Yuksel
Рет қаралды 10 М.
Basic Shadow Mapping // Intermediate OpenGL Series
16:54
OGLDEV
Рет қаралды 18 М.
蜘蛛侠这操作也太坏了吧#蜘蛛侠#超人#超凡蜘蛛
00:47
超凡蜘蛛
Рет қаралды 11 МЛН
BRAWLER MUTATIONS WILL BREAK THE GAME! - Brawl Talk
09:34
Brawl Stars
Рет қаралды 25 МЛН
Help Herobrine Escape From Spike
00:28
Garri Creative
Рет қаралды 55 МЛН
How I Implemented Shadows in my Game Engine
7:45
ThinMatrix
Рет қаралды 91 М.
OpenGL - Framebuffer Objects
14:37
Brian Will
Рет қаралды 20 М.
Shadow Mapping Unleashed! // Intermediate OpenGL Series
17:07
OpenGL - SSAO (screen space ambient occlusion)
11:22
Brian Will
Рет қаралды 32 М.
Tank Fighting Animation with The Hot Wind Blowing
2:13
Fourche7
Рет қаралды 2,2 МЛН
OpenGL - gamma correction, HDR tone mapping, bloom
15:26
Brian Will
Рет қаралды 12 М.
A Visual Explanation of Cascaded Shadowmaps
6:22
Wesley LaFerriere
Рет қаралды 4,3 М.
Shadow Mapping Strikes Back // Intermediate OpenGL Series
10:56
ARRAYLIST VS LINKEDLIST
21:20
Core Dumped
Рет қаралды 36 М.
蜘蛛侠这操作也太坏了吧#蜘蛛侠#超人#超凡蜘蛛
00:47
超凡蜘蛛
Рет қаралды 11 МЛН