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
0
votes
0 answers

How to correctly link Geometry Shader in DirectX11

I'm trying to introduce a Geometry Shader into my pipeline, but it does not seem to be recognized and the Vertex Shader tries to go directly into the Pixel Shader. I get this error message: D3D11 ERROR: ID3D11DeviceContext::Draw: Vertex Shader -…
mrfreedeer
  • 46
  • 4
0
votes
1 answer

OpenGL - Geometry Shader - Lines to Triangle Strips

My goal is to render a sine wave in 3D space. The wave would be made up of small line segments. So I have a vertex shader that passes the points of the waves as lines to my geometry shader. The geometry shader takes the two vertices in each line…
rtavakko
  • 31
  • 4
0
votes
0 answers

Avoid branching in round corners geometry shader

I made a glsl geometry shader that rounds corners of 2D line strips. Shader inserts circular fillets at each corner. There's a special case when two adjacent segments are colinear and fillet can't be created. In that case just a single original…
nj16
  • 63
  • 5
0
votes
1 answer

multiviewGeometryShader feature does not seems to be supported on the oculus 2, what alternatives?

So I wanted to modify the VrCuvbeWorld_Vulkan sample provided on the facebook website: https://developer.oculus.com/documentation/native/android/mobile-vrapi/ to add a geometry shader for the Oculus Quest 2. However when I tried to enable the…
LauVB
  • 5
  • 2
0
votes
0 answers

Shader not linking when geometry shader is attached OpenGL

I'm trying to create a shader that has a vertex, geometry, and fragment shader. I started off by just having a vertex and fragment shader and things worked fine but as soon as I try to attach my geometry shader as well the link is no longer…
0
votes
0 answers

What are The SPIR-V Capability (Geometry) Requirements

I have 2 framebuffers. First, one is layered. And renders HDR image to Cubemap. In this Renderpass Geometry Shader is used. Debug layer gives me the following error message. [VAL][VUID-VkShaderModuleCreateInfo-pCode-01091] Validation Error: […
aramok
  • 35
  • 1
  • 1
  • 6
0
votes
1 answer

How do you get 16 vertices which are control points of surface into the Geometry Shader in OpenGL?

I'm trying to render a cubic bezier surface with geometry shader so i have 16 control points which are all vec3s i change them to vec4s with w = 1 added in vertex shader and here's the problem: the geometry shader takes an array of vertices in form…
0
votes
1 answer

OpenGL displaying white screen while displaying multiple objects

I was trying to implement normal mapping on a simple cube but since i had troubles with my normals i wanted to try to display them using a geometry shader. Following learnopengl tutorial, it basically calls mesh.render() twice, the first time to…
Fra
  • 45
  • 5
0
votes
1 answer

Why am I getting this error in HLSL error X8000

error X8000: Validation Error: Declared output vertex count (348) multiplied by the total number of declared scalar components of output data (4) equals 1392. This value cannot be greater than 1024. The above error is given while I code my 3D…
0
votes
1 answer

How to implement Geometry Shader in DirectX for a 3D object like Cylinder?

I need help on how to implement Geometry Shader on Cylinder and what is the value of [maxvertexcount()], and do we need to provide the values of vertices and indices in ModelClass?
0
votes
1 answer

Does mod function returns highp float in OpenGL 3.3 core?

I am trying to understand why the following code generates the below error in a geometry shader: #version 330 core layout (points) in; layout (line_strip, max_vertices = 256) out; in int gs_timestampLabel[]; ... int numberChar[10]; int number =…
M.E.
  • 4,955
  • 4
  • 49
  • 128
0
votes
1 answer

Scaling seperate triangles (in geometry shader?)

For a masking object, I am trying to scale each triangle individually. If I scale the object as a whole, the points further away from the center will get moved too far and I just want the object to have 'more body'. Since I use it as a mask, it…
0
votes
0 answers

Link error with geometry shader (driver bug?)

I have a GLSL program that works on some machines, but fails to link on on one particular machine. I suspect a driver bug, but hope that someone will recognize something I'm doing as being poorly supported, and suggest an alternative. If I omit the…
JWWalker
  • 22,385
  • 6
  • 55
  • 76
0
votes
1 answer

OpenGL geometry shader passing texture coordinates

I'm having issues with passing my texture coordinates correctly through a geometry shader. My texture coordinates getting all messed up when it ends up in my fragment shader. Here's the vertex shader: #version 330 core layout(location = 0) in vec3…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
0
votes
0 answers

Is there a Dx11-Dx12 method to support a geometry shader that includes SV_COVERAGE

When attempting to expand OIT support for a Geometry Shader. The OIT logic requires a pixel shader to include an input item of SV_COVERAGE; however, this give a fxc compile error x4502 invalid input semantic 'SV_COVERAGE' when trying to compile the…
Robert
  • 658
  • 7
  • 11