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

learn more… | top users | synonyms

11
votes
1answer
1k 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 ...
5
votes
2answers
737 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: layout(triangles) in; ...
4
votes
3answers
1k 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 ...
4
votes
1answer
352 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 exist? (preferably Direct3D10). I'm building my geometry based on texture ...
3
votes
1answer
88 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 ...
3
votes
1answer
147 views

Queries regarding Geometry Shaders

I am dealing with geometry shaders using GL_ARB_geometry_shader4 extension. My code goes like : GLfloat vertices[] = { 0.5,0.25,1.0, 0.5,0.75,1.0, -0.5,0.75,1.0, ...
2
votes
1answer
119 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 ...
2
votes
2answers
667 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: [maxvertexcount(4)] void GS( point GS_Input ...
2
votes
1answer
445 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
166 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 ...
2
votes
1answer
294 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 ...
2
votes
0answers
555 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 ...
1
vote
1answer
76 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 ...
1
vote
0answers
157 views

opengl volumetric billboard implementation: general idea + geometry shader

A while ago I decided to implement the volumetric billboards technique in my university project (C++ & OpenGL 4.3). I passed the subject but failed to implement the mentioned technique. I'd like ...
1
vote
1answer
116 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 processed, vertex of an adjacent triangle, ...
1
vote
0answers
304 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 ...
0
votes
1answer
145 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 ...
0
votes
1answer
204 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 ...
0
votes
1answer
89 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 #version 430 core layout ( triangles ) in; layout ( ...
0
votes
1answer
173 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 ...
0
votes
1answer
1k 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 ...
-1
votes
1answer
668 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 ...