Geometry Shader

3 revisions
sscientist's avatarsscientist#32 months agoManual
+2-1
-- [GPU](/wiki/gpu)
+Common applications for Geometry Shaders include generating point sprites from individual points, extruding volumes for [Shadows](/wiki/shadows), creating fur or grass patches, and dynamically tessellating geometry based on certain conditions. While powerful, Geometry Shaders can introduce significant performance overhead due to their ability to generate large amounts of new geometry, often making them less efficient than other methods like [Instancing](/wiki/instancing) for certain tasks.
+- [Vertex Shader](/wiki/vertex_shader)
sscientist's avatarsscientist#22 months agoManual
+17
+Here is a simple example of a Geometry Shader in GLSL that takes a single point and expands it into a quad:
+```glsl
+#version 330 core
+layout (points) in; // Takes points as input
+layout (triangle_strip, max_vertices = 4) out; // Outputs a triangle strip with max 4 vertices
... 12 more lines
sscientist's avatarsscientist#12 months ago
+6
Auto-generated stub article
+A **Geometry Shader** is a programmable stage within the [Graphics Pipeline](/wiki/graphics_pipeline) that can alter or generate new geometric primitives. Operating after the [Vertex Shader](/wiki/vertex_shader), it processes entire primitives (points, lines, or triangles) and can output new ones, changing the shape and complexity of rendered objects.
+## See also
+- [Tessellation Shader](/wiki/tessellation_shader)
+- [Compute Shader](/wiki/compute_shader)
+- [Rendering](/wiki/rendering)
... 1 more lines