Nice. I especially enjoyed the examples. I never knew what to use geometry shaders for.
@Ananasbleu6 ай бұрын
amazing content, thank you so much for this course! 🙏
@ryanLikesRainyDays7 ай бұрын
Invaluable, thanks!
@TheWhitde3 ай бұрын
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 Жыл бұрын
Very nice. Thank you Cem!
@NickDrian2 жыл бұрын
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 Жыл бұрын
whats the modern alterative
@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 Жыл бұрын
@@NickDrian thank you!
Жыл бұрын
Can you please point out to the source which saying geometry shader is not supported?
@allocator7520 Жыл бұрын
opengl is not supported anymore 🤣
@emanueol2 жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
@@emanueol It indeed emits a sequence! The sequence is RED->GREEN->BLUE. It does not span around the first vertex (red).
@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 Жыл бұрын
@@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.)
@aleksanderaksenov13632 жыл бұрын
Sir and whats about Mesh Shader technology?
@cem_yuksel2 жыл бұрын
We'll talk about mesh shaders in Lecture 20.
@xhenryx142 жыл бұрын
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
@DasAntiNaziBroetchen2 жыл бұрын
Vertex shader
@konstantinbondarenko52352 жыл бұрын
Nice
@coderhex16752 ай бұрын
Dostum adın Cemmiş, Türklerin böyle şeyler bilebileceğini sanmazdım.
@samxu53202 жыл бұрын
I have no idea if Geometry Shader is not necessarily existed in the future ray tracing technology
@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.