Jump to content
  • Advertisement
Sign in to follow this  
jenny_wui

Some clarification needed regarding geometry shader

This topic is 848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I encountered some problem while using geometry shader. Usually input from the vertex shader should be passed via geometry shader (if used) to the fragment shader. But is it possible that geometry shader (when used in a program) can be bypassed and output from the vertex shader can be directly sent to fragment shader bypassing the geometry shader? 

Any clarification will be highly appreciated.

Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement

yes, not using the geometry shader is the classical, most common case. you simply bind the vertex and pixelshader and the output from the VS will be the input of the PS.

Share this post


Link to post
Share on other sites

I think I could not make you understand properly. I'm using geometry shader and it is linked to the program, but can the data  be sent from the vertex shader to the fragment shader by-passing the geometry shader? Is it any way possible?

 

 

Share this post


Link to post
Share on other sites

I've encountered some unusual problem. Geometry shader is not set to NULL. In one platform when I run the program, it shows the following linking error:

 

Linking program
The fragment shader uses varying Position, but previous shader does not write to it.
The fragment shader uses varying Normal, but previous shader does not write to it.
 
 
In another platform it works fine, without showing any error.
 
I'm very much confused.

Share this post


Link to post
Share on other sites

It seems to me some thing goes with the version. OpenGL 4.5 allows vertex shader output to be bypassed by the geometry shader (even when geometry shader is linked) and fragment shader can work with directly from the geometry shader though no output from geometry shader to fragment shader is made. But with OpenGL 4.3 it shows linking error as I mentioned above. Any way, I'd like to hear from others regarding this whether I'm right or not.
Thank you!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!