cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

__ian__
Adept I

OpenGL geometry shaders + interpolation qualifiers

Reading the spec it says

Output variables can be defined with interpolation qualifiers. The Fragment Shader equivalent interface variables should define the same variables with the same qualifiers.

https://www.khronos.org/opengl/wiki/Geometry_Shader#Outputs

On my ATI card it just seems to ignore the interpolation qualifier completely and the output is broken -> https://i.imgur.com/P8TwxFC.jpg Should look like -> https://i.imgur.com/ld9w7RD.jpg There's no warnings or compile errors, it just ignores noperspective and does 1/z interpolation as normal.

This is my shader input/outputs -> https://i.imgur.com/WXqIoYD.png

I am trying to do custom attribute interpolation.

0 Likes
5 Replies
xhuang
Staff
Staff

Re: OpenGL geometry shaders + interpolation qualifiers

Hello, can you test with the latest driver? If you're seeing the same problem, please provide the source code/binary then we can debug this problem. Thanks.

0 Likes
__ian__
Adept I

Re: OpenGL geometry shaders + interpolation qualifiers

Hi,

I don't currently have an AMD card for testing. But I've attached a very simple test program. All the code is in the shaders which can be found in

\media\shaders\gsquads\

You can press M to toggle between regular interpolation and quadratic interpolation using GL_LINES_ADJACENCY.

P pauses the spinning. R to re-load shaders.

Looks like this on my nvidia card -> https://i.imgur.com/vYrrRq6.png

0 Likes
xhuang
Staff
Staff

Re: OpenGL geometry shaders + interpolation qualifiers

This is what i got running your quad test with default settings. It seems what we expected and the problem has already been fixed in latest driver.

pastedImage_1.png

pastedImage_2.png

0 Likes
__ian__
Adept I

Re: OpenGL geometry shaders + interpolation qualifiers

I just checked your screenshots with the output from my nvidia card, and it's identical. So you can tick this one off

0 Likes
xhuang
Staff
Staff

Re: OpenGL geometry shaders + interpolation qualifiers

Again, appreciation for your reporting. We'd like help as much as possible.

0 Likes