4
\$\begingroup\$

I have different Shaders and for each Shader a instance of the ShaderClass class, which initializes the Shaders, Renders the Shaders, etc.

I use most of the Shaderclasses without Geometry Shader, but in one Shader Class i also use a Geometry Shader.

The problem is, that when I render one object with the Shaderclass that uses the Geometry shader, all other object are rendered with the same geometry that I create in the Geometry Shader. Can you help me?

Is it possible that I have to use a Geometry Shader for each object, when I use one for one object?

I use DirectX 11 with C++.

\$\endgroup\$
3
\$\begingroup\$

After using the geometry shader, you'll need to do GSSetShader(NULL, NULL, 0) to disable it. Otherwise the geometry shader will remain active during all rendering afterward.

If you use DX11 tessellation shaders (hull & domain shaders) you'll similarly need to set them to NULL when you don't want tessellation anymore.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.