Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [geometry-shader]

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

1
vote
0answers
30 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 ...
2
votes
1answer
70 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 "...
2
votes
2answers
117 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 ...
0
votes
1answer
63 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 ...
0
votes
1answer
39 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 ...
1
vote
0answers
129 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 (...
1
vote
0answers
199 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 ...
2
votes
1answer
2k 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 ...
0
votes
1answer
175 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 ...
0
votes
2answers
1k 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 ...
1
vote
1answer
44 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 ...
5
votes
1answer
226 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 "...
3
votes
0answers
190 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 ...
4
votes
2answers
854 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, ...
0
votes
1answer
201 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 ...
0
votes
1answer
381 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 ...
21
votes
1answer
6k 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 ...
1
vote
2answers
642 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.
7
votes
2answers
4k 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 ...
2
votes
0answers
278 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 ...
1
vote
2answers
842 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 ...
0
votes
1answer
79 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/...
1
vote
0answers
396 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 ...
1
vote
0answers
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 ...
1
vote
1answer
219 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 ...
3
votes
1answer
735 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 ...
1
vote
1answer
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 ...
0
votes
1answer
4k 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 ...
0
votes
1answer
847 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 ...
1
vote
1answer
764 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 ...
0
votes
1answer
877 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 ...
3
votes
1answer
380 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 ...
4
votes
3answers
9k 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 ...
1
vote
1answer
2k 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 ...
2
votes
1answer
1k 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 ...
2
votes
1answer
186 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 ...
0
votes
1answer
4k views

Simple pass-through geometry shader with normal and color

I've written a very simple pass-through geometry shader. My input and output primitives are points. I also want to forward the color and normal from vertex shader to fragment shader through geometry ...
3
votes
1answer
288 views

Queries regarding Geometry Shaders

I am dealing with geometry shaders using GL_ARB_geometry_shader4 extension. My code goes like : ...
15
votes
2answers
3k views

Toon/cel shading with variable line width?

I see a few broad approaches out there to doing cel shading: Duplication & enlargement of model with flipped normals (not an option for me) Sobel filter / fragment shader approaches to edge ...
7
votes
2answers
3k views

Geometry shader for multiple primitives

How can I create a geometry shader that can handle multiple primitives? For example when creating a geometry shader for triangles, I define a layout like so: ...
0
votes
1answer
2k views

Vertex shader are evil for performance?

I found that the vertex shaders are sometimes very useful, especially because they can generate geometries and extract and use a lot of informations from just 1 image. The problem is that my project ...
0
votes
1answer
401 views

Why does setting a geometry shader cause my sprites to vanish?

My application has multiple screens with different tasks. Once I set a geometry shader to the device context for my custom terrain, it works and I get the desired results. But then when I get back to ...
2
votes
1answer
381 views

Geometry shader questions?

I had some questions on geometry shaders. Do directx geometry shaders offer anything over the opengl ones? What advantages does the official geometry shader implementation on opengl 3.2 have over ...
3
votes
0answers
1k views

Geometry Shader and Stream Output with Directx11

I am having trouble trying to send verticies generated in the Geometry Shader to Stream Output. What I am trying to accomplish is to generate verticies from the Geometry Shader and store them to a ...
6
votes
1answer
463 views

Running geometry shader only once

(Unfortunately couldn't find the answer myself) Does a neat way to cache the geometry shader results in Direct3D10 or OpenGL ...
2
votes
2answers
1k views

How do I keep a triangle strip between geometry shader invocations?

I'm using a small geometry shader to build a "ribbon" from a set of points. For each point, I create 4 vertices that represent a section of the ribbon: ...