Questions tagged [geometry-shader]

Geometry shader should not be mixed up with [vertex-shader], but are shader programs executed after vertex shaders. They take as input a whole primitive like point, line or triangle.

Geometry shaders are the 3rd type of GPU shader programs after and and process whole primitives like points, lines or triangles.

Resources

232 questions
1
vote
1 answer

Correctly calculating attenuation of point and spot lights in Unity using a ForwardAdd pass

I've encountered a problem where in my custom Geometry shader, I can't seem to nail the correct attenuation. This causes all point- and spot lights to have a square of light around them. The color is correct, so is the range, but for some reason the…
1
vote
1 answer

OpenGL Pipeline

Does the Geometry Shader affects the buffer of vertices and indices (VBO and EBO data in GPU memory) initially specified in the cpu side? For example, suppose I have a vertex buffer containing three vertices, each with some attributes attached to…
gmmk
  • 69
  • 5
1
vote
1 answer

Why does OpenGL ES not support geometry shaders?

I read here and there that OpenGL ES does not support geometry shaders. I just wanted to know if it will be added in the future and if not I'd be interested in why. Is it a technical limitation of some sort?
Valzul
  • 51
  • 2
1
vote
1 answer

Passing vertex attributes with layouts in geometry shader

Let's say we have a GL program consisting of the following vertex, geometry and fragment shaders. vertex: #version 410 layout (location = 0) in vec2 pos; layout (location = 1) in vec2 size; layout (location = 2) in float rot; layout (location = 3)…
bamia
  • 333
  • 3
  • 15
1
vote
0 answers

Why is my cubemap rendered to FBO only rendering one side of my cube?

I want to render my scene into a cubemap FBO but I can't seem to get it working properly. Only 1 side of my cube is showing the rendered cubemap as a test. This is my FBO setup: // create cubemap FBO unsigned int cubemapFBO; glGenFramebuffers(1,…
1
vote
0 answers

Geometry shader odd issue

I want to use geometry shader to draw triangles of mesh, but encounter a really odd issue. Result As follow: The wrong output. The Right output. The only diff between wrong and right in code, is when converting 3d position vector to 4d position…
zichao liu
  • 311
  • 1
  • 6
1
vote
1 answer

OpenGL: how to pass vertex pos from Geometry shader to fragment shader?

I am currently learning shaders in OpenGL and finished writing my "drawText" geometry shader, so I can draw dynamic text ( content change every frame ), without recreating VBO every frame. It's working nicely but it's limited to 28 chars, because of…
SebKun
  • 105
  • 1
  • 10
1
vote
2 answers

How can I fix this Python Arcade Geometry Shader error?

I have a big Problem. In the Python Arcade Library on the newest version (on Version 2.5.7 the Programm running successfull) is this error on the start from every programm: Traceback (most recent call last): File…
Undercraft_CR
  • 55
  • 1
  • 9
1
vote
2 answers

Why doesn't OpenGL clip primitives from my geometry shader that lie partially outside the viewing volume?

http://www.opengl.org/wiki/Rendering_Pipeline_Overview says that "primitives that lie on the boundary between the inside of the viewing volume and the outside are split into several primitives" after the geometry shader is run and before fragments…
Kyle
  • 178
  • 1
  • 8
1
vote
1 answer

Why doesnt my passthrough geometry shader work?

I am making project of cubesphere Earth. I implemented vertex and fragment shaders for textures and it worked fine (with camera movement). I wanted to add a passthrough geometry shader but i cant get it to work. Vertex shader #version 450…
1
vote
1 answer

Is there a faster alternative to geometry shaders that can render points as a specific number of triangles?

I'm currently using openGL with a geometry shader to take points and convert them to triangles during rendering. I have n lists of points that will each be rendered as n triangles (first list of points each becomes one triangle, second becomes two…
user3124047
  • 153
  • 11
1
vote
1 answer

Using gl_ClipDistance in a geometry-shader

I'm trying to make use of gl_ClipDistance within a geometry-shader but I cannot get it to work. My shader runs within a transform-feedback recording and I want to cut triangles against 4 clipping planes. I read the GLSL lang spec and tried to find a…
1
vote
1 answer

Geometry shader and Draw calls

I am working on an old code base that uses Geometry shaders. It uses "glProgramParameteriEXT(...) to enable and specify Input/Output of the GS. The code in question is rendering curves. The input to the GS(via above mentioned method and not in the…
RAvatar
  • 11
  • 2
1
vote
1 answer

The Geometry Shader is duplicating Shapes (in Processing)

I'm trying to generate a simple shape with a Geometry Shader, but the shape is rendering twice and I don't know why. First we have a really simple Vertex Shader #version 150 in vec4 position; void main() { gl_Position = position; } Then…
Pau Rosello
  • 137
  • 7
1
vote
1 answer

Geometry Shader won't compile in DirectX10 HLSL

I've been trying to code a geometry shader in order to generate billboard systems as explained in Frank Luna's book Introduction to 3D Game Programming with DirectX. I insert the shader into my technique as follows: pass P3 { …
pypmannetjies
  • 25,734
  • 7
  • 39
  • 49