Interactive Graphics 17 - Geometry Shaders

  Рет қаралды 10,706

Cem Yuksel

Cem Yuksel

Күн бұрын

Пікірлер
@wolpumba4099
@wolpumba4099 2 жыл бұрын
Nice. I especially enjoyed the examples. I never knew what to use geometry shaders for.
@Ananasbleu
@Ananasbleu 6 ай бұрын
amazing content, thank you so much for this course! 🙏
@ryanLikesRainyDays
@ryanLikesRainyDays 7 ай бұрын
Invaluable, thanks!
@TheWhitde
@TheWhitde 3 ай бұрын
Looking into this to calculate tangent and binormal on the fly since need 3 vertices. Also, on a mesh where I have no normals I use this stage to get the face normals on the fly. Another use I'm looking at is if the input triangle is "2 sided" then it will output ACB instead of ABC depending on the normal facing.
@kubatpav
@kubatpav Жыл бұрын
Very nice. Thank you Cem!
@NickDrian
@NickDrian 2 жыл бұрын
Nice video but it turns out that geometry shaders are no longer supported. The are a dpricated feature of the API do to a lack of support and being slower on many machines.
@adlansan5187
@adlansan5187 Жыл бұрын
whats the modern alterative
@NickDrian
@NickDrian Жыл бұрын
@@adlansan5187 Instead of re-generating geometry every frame via geometry shaders, simply store the geometry in vram using a vertex array object. If you want to make per frame shape alterations, that can be done in the vertex shader. Look into vertex animation textures if your interested in an example.
@adlansan5187
@adlansan5187 Жыл бұрын
@@NickDrian thank you!
Жыл бұрын
Can you please point out to the source which saying geometry shader is not supported?
@allocator7520
@allocator7520 Жыл бұрын
opengl is not supported anymore 🤣
@emanueol
@emanueol 2 жыл бұрын
at 26mins isnt it graphic wrong of geometry shader output of 3 vertexes (2 segments sharing green), should it be 2 segments like green-red and red-blue since its the concept of line-strip ? thanks
@burrakauchy3715
@burrakauchy3715 Жыл бұрын
No, it is not. If you look at the input of the Geometry shader, the first vertex is the red one, the second is the green one, and the third is the blue one. So we have red-green, then green-blue.
@emanueol
@emanueol Жыл бұрын
@@burrakauchy3715 I was wondering if strip was emiting sequence, but based in what you say and video, i suppose all EMITS after 2nd inclusive all span around 1st vertice
@burrakauchy3715
@burrakauchy3715 Жыл бұрын
@@emanueol It indeed emits a sequence! The sequence is RED->GREEN->BLUE. It does not span around the first vertex (red).
@emanueol
@emanueol Жыл бұрын
@@burrakauchy3715 i see, i wrongly thinking emits were for single type of primitive ("Triangle strip") but just googled bit after your comment and "(..)The GS defines what kind of primitive these vertex outputs represent. The GS can also end a primitive and start a new one, by calling the EndPrimitive() function. This does not emit a vertex. In order to write two independent triangles from a GS, you must write three separate vertices with EmitVertex() for the first three vertices, then call EndPrimitive() to end the strip and start a new one. Then you write three more vertices with EmitVertex()." via EndPrimitive etc, so the type of primitive is dynamically sent in between the EMITS.
@burrakauchy3715
@burrakauchy3715 Жыл бұрын
@@emanueol I don't think the type of primitive is dynamically sent between the Emits. It is written in "layout ( line_strip, max_vertices = 5) out;". What EndPrimitive does is telling when you end one primitive, and therefore the emits that will come after will form a new primitive. If, in our example, you want to send 3 line strips, then you would have to do // primitive 1 // some computations EmitVertex(); // some computations EmitVertex(); ... // some computations EmitVertex(); EmitPrimitive(); // primitive 2 // some computations EmitVertex(); // some computations EmitVertex(); ... // some computations EmitVertex(); EmitPrimitive(); // primitive 3 // some computations EmitVertex(); // some computations EmitVertex(); ... // some computations EmitVertex(); EmitPrimitive(); If you did not have the EmitPrimitive in between, then your shader would output a single line strip with all the emitted vertices. But the type of primitive is given in the "layout ( line_strip, max_vertices = 5) out;" line. (Maybe I misunderstood your comment though ^^' Sorry in that case.)
@aleksanderaksenov1363
@aleksanderaksenov1363 2 жыл бұрын
Sir and whats about Mesh Shader technology?
@cem_yuksel
@cem_yuksel 2 жыл бұрын
We'll talk about mesh shaders in Lecture 20.
@xhenryx14
@xhenryx14 2 жыл бұрын
Hi Cem! Which shader should I use if I want to create the surface of a terrain using a 2D image height map? But like the height map can change from user input like in a terrain editor
@DasAntiNaziBroetchen
@DasAntiNaziBroetchen 2 жыл бұрын
Vertex shader
@konstantinbondarenko5235
@konstantinbondarenko5235 2 жыл бұрын
Nice
@coderhex1675
@coderhex1675 2 ай бұрын
Dostum adın Cemmiş, Türklerin böyle şeyler bilebileceğini sanmazdım.
@samxu5320
@samxu5320 2 жыл бұрын
I have no idea if Geometry Shader is not necessarily existed in the future ray tracing technology
@AG-ld6rv
@AG-ld6rv Жыл бұрын
Ray tracing is expensive (both on the hardware's resources and your wallet's). Games will offer a rasterization option for quite a long time into the future. Yeah, the idea of everyone using path ray tracing is nice for a game developer - you configure your materials/lights and all effects are deduced. Unfortunately, they're going to need to code the whitted ray tracing (known as just "ray tracing" in the gaming scene) with a mix of rasterization and pure rasterization in addition to path ray tracing. All these new technologies mean a AAA title has to support three technologies at once - not that they can support just the best one and do a one and done approach.
Interactive Graphics 18 - Tessellation Shaders
1:01:29
Cem Yuksel
Рет қаралды 15 М.
Interactive Graphics 20 - Compute & Mesh Shaders
59:58
Cem Yuksel
Рет қаралды 18 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Interactive Graphics 26 - GPU Ray Tracing
1:10:00
Cem Yuksel
Рет қаралды 12 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 1 МЛН
Ray Marching, and making 3D Worlds with Math
6:28
SimonDev
Рет қаралды 259 М.
Interactive Graphics 22 - Global Illumination
1:10:00
Cem Yuksel
Рет қаралды 14 М.
Coding Adventure: Compute Shaders
5:25
Sebastian Lague
Рет қаралды 798 М.
Rasterizer Algorithm Explanation
5:18
HuCE - cpvrLab
Рет қаралды 87 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН