Questions tagged [geometry-shader]

A geometry shader creates a list of vertices from a given set of input vertices in the rendering pipeline.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Trouble trying to use multiple rendertargetviews and viewports at the same time

I have worked on the GSCubemap demo for DX11 to obtain rendering to multiple rendertargets and modified it to render to a single RTV with multiple viewports with SV_ViewportArrayIndex. I'm now trying ...
philB's user avatar
  • 129
0 votes
1 answer
390 views

error X4532 Cannot map expression to gs_5_0 instruction set

Using DX11 I have this line starting with TC = txDiffuse in a geometry shader that generates the error message. Can someone explain me the problem or if it is not possible to sample in geometry shader ...
philB's user avatar
  • 129
0 votes
0 answers
119 views

Problem with geometry shader and srteamout (directx11)

I'm starting with geometry sahder to simply transform vertex pos/norm in world space and pass this to ouput vertex buffer for sequential rendering. A unique original model is created with position ...
philB's user avatar
  • 129
0 votes
0 answers
139 views

How to generate a randomly-positioned leaf quads with a geometry shader?

Does anyone have any idea how to implement a shader that manages to make this effect in Unity? I found a post that explains, but I'm still learning shaders so I didn't really understood how to go ...
Arthur Leandro's user avatar
1 vote
1 answer
403 views

Why is my tessellation output failing to reach my geometry shader?

I'm attempting to render grass using GLSL tessellation and geometry shaders. For vertex input, I'm using position and normal. For reference, here's an image of the grassy field without tessellation (...
Grimelios's user avatar
  • 559
-1 votes
1 answer
178 views

Pass equations into shaders to define graphics - HLSL or other shaders

Is it possible with HLSL (or other popular shader languages) to pass instead of an image, an equation that would define the pixel color / position output by the shader? This would allow for more ...
alaokastrail's user avatar
1 vote
1 answer
2k views

Has the Geometry Shader been abandonded?

Advice says to either limit use or not to use it at all. Friday Facts #251 - A Fistful of Frames | Factorio: We tried it, and it worked great. We got some speedup due CPU needing to prepare less ...
Casey's user avatar
  • 2,025
0 votes
0 answers
148 views

How do I store the texture coordinates for thousands of tiles in a tile mesh on the GPU and not just the most recent?

This is a follow-up to this question. The geometry shader is performing fantastically, but now I've lost the ability to display more than one tile type at once (the last one in the visible array is ...
Casey's user avatar
  • 2,025
0 votes
1 answer
384 views

Geometry shader-generated tile mesh isn't any faster than CPU-generated version

For practice, I'm writing a Rogue-like. In order to speed up tile rendering I have a dynamic Mesh/MeshBuilder that collects all the vertices of the visible tiles' quads (4 vertices per tile: position, ...
Casey's user avatar
  • 2,025
0 votes
1 answer
452 views

Geometry shader vertex position to point at camera

I have a shader that takes an array of points. At each point, a geometry shader creates a quad oriented towards the camera. This works fine when the camera and point are at around the same Y value, ...
Basic's user avatar
  • 1,268
1 vote
1 answer
510 views

Unable to create Shader Object for Geometry Shader (GL_GEOMETRY_SHADER)

I am just starting with OpenGL using c++ on Ubuntu 18.04. The problem I have is that when I try to link Geometry Shader in my main program, the following function call is unable to create an object (...
Tanay's user avatar
  • 11
0 votes
1 answer
345 views

Can geometry grass shaders be painted to a terrain or are they limited to meshes?

So I was follow the roystan grass shader tutourial and although it works well I don't understand the use for it. From what I understand the shader is basically just a flat plane that calculates grass ...
Bobby B's user avatar
  • 21
0 votes
1 answer
111 views

How to compress repetitive information when uploading mesh data?

I want to avoid sending repetitive information when drawing a mesh. If I use a single point for each face and two vectors as additional attributes that represent the travel of each vertex, I can use ...
Mr.UNOwen's user avatar
1 vote
0 answers
345 views

Hard coded triangle in CG geometry shader doesn't show on screen

In Unity I'm planning on using a geometry shader for processing points into quads and can't quite figure out why I'm not getting output from my geometry shader. I've edited it down to a minimum ...
Fraser's user avatar
  • 111
1 vote
0 answers
1k views

How to make the hidden edges to be rendered as dashed lines and remove unnecessary diagonals in Wireframe shaders?

I am currently working on the wireframe shaders which is working. I managed to have some sort of dashed wire whenever the the edges is hidden from the view but I am having problem with certain views ...
Mira's user avatar
  • 139
3 votes
1 answer
1k views

Solving a recursive problem in the geometry (or any other) shader

I would like to calculate an effect of an external force on a binary tree (wind on a tree). It's a recursive function - take a (parent) node and calculate the angle to rotate all of the nodes "...
Karlovsky120's user avatar
3 votes
3 answers
2k views

What are "free vertex indices" in WebGL 2 and how do they relate to geometry shaders?

In January Notch tweeted about WebGL 2: WebGL 2 is happening. Bye, compatibility! Hello, 3d textures and pixel buffers! oh god it's got free vertex indices in the shader. That is basically a geometry ...
JoJnr's user avatar
  • 33
0 votes
1 answer
168 views

Hardcode model data into geometry shader

I have this idea for creating a point cloud and passing an integer into geometry shader to determine which model to draw, each model has the same amount of vertices etc and it would be hardcoded into ...
Werem's user avatar
  • 148
0 votes
1 answer
76 views

Transform vertices in a line differently?

With a GL_LINE, is there a way to have the vertex (or geometry) shader treat the first and second point differently? i.e. In a line from ...
Matt's user avatar
  • 165
1 vote
0 answers
398 views

render trajectory of particle in forcefield using GLSL shader

I want to visualize flow of particles in some forcefield e.g. electromagetic, gravitional or potential flow in fluid (streamlines); I was thinking to use Geometry Shader which would look like this (...
Prokop Hapala's user avatar
1 vote
0 answers
307 views

How to draw lines in screenspace like grids in a perspective world?

In my Geometry shader this is what my line shader looks like ...
Basit Anwer's user avatar
2 votes
1 answer
3k views

Unity: Simple “pass through” geometry shader

I would like to implement a geometry shader that does nothing, just for the purpose of learning and to go ahead with that and do something useful with it. I currently have: A compute shader creating ...
Christoph's user avatar
  • 135
0 votes
1 answer
553 views

OpenGL geometry shader 2d rectangle extrusion has weird angles

I have a geometry shader that extrudes lines to rectangles in 2d (by outputting triangle strips). When the lines are not parallel to the X or Y axis, I'm getting parallelograms instead. Also, when the ...
dkilmer's user avatar
  • 21
0 votes
2 answers
5k views

What is the best way to draw outline of object using OpenGL

I want to select the best way to draw outline of 3d human like object and what would be the best way to draw outline for this kind of objects. I found about stencil buffer based methods, geometric ...
user94577's user avatar
1 vote
1 answer
63 views

3D prospective with geometry shader objects

I am wanting to be able to render objects with a geometry shader and allow them to rotate with the camera perspective...this is what I have so far, as a example Vertex shader ...
0xen's user avatar
  • 453
5 votes
1 answer
700 views

Simple square vertex lifting shader

I am trying to rebuild the fur effect in Viva Pinata. Here each square becomes a pattern of fur I imagine the process to be like this... U lift one end of the triangles. Now I need to achieve "...
Blue Bug's user avatar
  • 1,112
3 votes
0 answers
323 views

Geometry Shader crashing

I keep getting some strange errors in my Geometry shader and when I search for the cause of the errors, it returns nothing substantial. Here is the code. Shader ...
0xen's user avatar
  • 453
4 votes
3 answers
3k views

Generating face normals with the geometry shader

I'm trying to visualize the face normals for a mesh, using the geometry shader to generate lines represeting the normal vectors. My intention was to draw that line from the triangles centroid, ...
Baron VonFacepalm's user avatar
0 votes
1 answer
234 views

Unity Geometry Shader Compiles forever

I am writing a shader to achieve a laser show effect example. For now I am just focusing on the lines. One line ist represented as one triangle. When I save my shadercode, unity gets inactive and I ...
Freshchris's user avatar
0 votes
1 answer
470 views

Unity Geometryshader for one Vertex

Hy, I want to build some geometry with a geometryshader in Unity. I took a look at this. I want to create my geometry just in context of one point in 3D space (x,y,z). Can i somehow use the transform ...
Freshchris's user avatar
24 votes
1 answer
16k views

What are Hull, Domain and Geometry shaders used for?

I've done my fair share of 3D game programming for my (former) employer, and also in my own custom engines for my own indie games. Initially, I started with Direct3D 9, and D3DX9, which pretty much ...
Panda Pajama's user avatar
  • 13.4k
1 vote
2 answers
1k views

Outline of plane slice of arbitrary object

How would you extract the outline of a shape from slicing a plane through an arbitrary object? Note: This is related to my Unity Answers question, but not exactly the same.
ina's user avatar
  • 294
8 votes
2 answers
7k views

Geometry Shader not generating geometry for some Vertices

I am playing with a geometry shader and I am wondering why it doesn't generate geometry for each vertex in all meshes? I don't think this is a Cull problem because the same vertices generate geometry ...
MLM's user avatar
  • 1,935
2 votes
0 answers
386 views

OpenGL: Avoid geometry shader for cubemap framebuffer

I want to render an environment map into a cubemap framebuffer but I dislike the fact, that I have to use the geometry shader to set gl_Layer because the geometry ...
tly's user avatar
  • 133
1 vote
2 answers
1k views

C++, OpenGL: Building a polyhedron via geometry shader

I'm stuck with geometry shaders in OpenGL - c++ programming. I want to create simple cube by repeating 6 times drawing one rotated wall. Here is my vertex shader (everyting has #version 330 core in ...
Cheshire Cat's user avatar
0 votes
1 answer
86 views

Need help creating points in an array

I'm creating a lightning geometry shader using hlsl that creates an array of points based on an arbitrary number of generations. The gist of what I want to accomplish is here: http://drilian.com/2009/...
Craig J's user avatar
  • 11
1 vote
0 answers
590 views

Geometry shader: Dynamic output?

I'm currently using a geometry shader to generate grass blades out of single root points that are layed out in a grid. For each root point, I generate a grass blade with, right now, a constant number ...
brdigi's user avatar
  • 70
1 vote
0 answers
2k views

geometry shader shim for opengl es 2.0

I just have a few months of OpenGL experience, just starting to get the hang of it. I find geometry/vertex/fragment shaders to be very powerful. You have a few parameters that translates into a ...
Tamas's user avatar
  • 111
2 votes
1 answer
406 views

Geometry Shader only creates one primitive

I am currently trying to use the geometry shader. My input is a set of points, for which multiple triangle should be created This is the geometry shader ...
H4kor's user avatar
  • 155
3 votes
1 answer
1k views

what happens with missing vertices in geometry shader

I am relatively new to GLSL shader programming, and the documentation I found is unfortunately often inscrutable. I am having trouble understanding a few things with how geometry shaders fit into the ...
Tim Seguine's user avatar
1 vote
1 answer
1k views

Manually writing a dx11 tessellation shader

I am looking for resources on what are the steps of manually implementing tessellation (I happen to be using Unity CG, but any help is appreciated). Today it seems that it is all the rage to hide ...
Spectraljump's user avatar
0 votes
1 answer
6k views

Calculating Per Vertex Normal in Geometry Shader

I am able to calculate normals per face in my Geometry Shader but i want to calculate per vertex normal for smooth shading. My Geometry shader is ...
bhawesh's user avatar
  • 181
0 votes
1 answer
957 views

Why are my geometry-shader-generated billboards not showing up given the following code?

My program is a rain particle system. After processing a list of positions of rain particles, I passed them to the geometry shader for generating a billboard for each position. If I use a simple ...
khanhhh89's user avatar
  • 243
1 vote
1 answer
1k views

Geometry Shader input vertices order

MSDN specifies (link) that when using triangleadj type of input to the GS, it should provide me with 6 vertices in specific order: 1st vertex of the triangle ...
NPS's user avatar
  • 2,314
0 votes
1 answer
1k views

Problem with Texture Array and billboards [closed]

It's my first post here. My name is Bruno and I'm from Brazil. I'm trying to learn DirectX 11, and I'm using Frank Luna's book. The problem is that he uses the Effects Framework to do everything, and ...
Bdv's user avatar
  • 11
3 votes
1 answer
600 views

How do we apply different textures to different faces generated via geometry shader?

I am trying to render a cube by starting of with one vertex into the shader, then geometry shader to expand into a cube, and then apply a different texture to each side. The part I am facing the issue ...
bluejamesbond's user avatar
6 votes
3 answers
14k views

How can I draw a quad in wireframe with modern OpenGL, without rendering the interior bisecting edge?

I want to draw a quad (not two triangles). I actually know that triangles are faster, as I answered this question. But let's say I am building a 3D modeling tool. It makes sense to draw a quad for ...
concept3d's user avatar
  • 12.7k
1 vote
1 answer
3k views

Geometry shader and triangle adjacency

I'm currently trying to change my project to use GL_TRIANGLE_ADJACENCY instead of GL_TRIANGLES. Following this question, I have managed to construct my index buffer fine, but when it comes to the ...
Soapy's user avatar
  • 915
2 votes
1 answer
2k views

How do you add rotation to particles?

Today I was working on a particle system and I can't figure out how to give the particle billboards a rotation (so to have them spinning clockwise or counter-clockwise while facing the player). I ...
Oliver Salzburg's user avatar
2 votes
1 answer
194 views

Geometry shaders on Surface RT

Can anyone tell me if geometry shaders are supported on the Microsoft Surface RT? On one hand, MSDN makes it sound like the Surface RT supports only feature level 9_1, and geometry shaders are only ...
Justin R.'s user avatar
  • 199