You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the tutorial 5 code currently posted, I noticed that the colors aren't interpolating smoothly between the vertices as expected.
EDIT 1: I made some observations.. check the bottom of the post.
To recall, here's the expected output:
here's the actual output:
So far, I have attempted to add smooth attributes in the shaders and change the Enum values of smoothness in the DrawParameters.
EDIT 1:
When hardcoding the color values myself, by providing a color field in the vertex buffer format,
I noticed some unexpected behaviours when setting some of the rgba values to negative, and some to 0.
For example, see what happens when you provide these colors for vertices:
Smooth interpolation: [0.0,0.0,0.0,1.0], [0.0,0.5,0.0,1.0], [0.5,0.0,0.0,1.0]
Border: [0.0,0.0,0.0,1.0], [0.0,0.5,0.0,1.0], [0.5,-0.25,0.0,1.0]
I believe negative values for colors should be clamped to 0, but it seems like this isn't the case when you interpolate between two non-black colors^.
I have tested this both on Windows 10 and Linux.
Could you please let me know what could be the cause of this?
The text was updated successfully, but these errors were encountered:
I am getting the same result s! My guess is that the screenshot was made using an older glium version and that older version was handling rendering differently (turning on different flags, etc.) Or there are some driver shenanigans involved
P. S.
Tested on Ubuntu on Intel intergrated graphics. (Intel Corporation HD Graphics 620; Mesa 20.0.4)
When running the tutorial 5 code currently posted, I noticed that the colors aren't interpolating smoothly between the vertices as expected.
EDIT 1: I made some observations.. check the bottom of the post.
To recall, here's the expected output:
here's the actual output:
So far, I have attempted to add smooth attributes in the shaders and change the Enum values of smoothness in the DrawParameters.
EDIT 1:
When hardcoding the color values myself, by providing a color field in the vertex buffer format,
I noticed some unexpected behaviours when setting some of the rgba values to negative, and some to 0.
For example, see what happens when you provide these colors for vertices:
Smooth interpolation: [0.0,0.0,0.0,1.0], [0.0,0.5,0.0,1.0], [0.5,0.0,0.0,1.0]
Border: [0.0,0.0,0.0,1.0], [0.0,0.5,0.0,1.0], [0.5,-0.25,0.0,1.0]
I believe negative values for colors should be clamped to 0, but it seems like this isn't the case when you interpolate between two non-black colors^.
I have tested this both on Windows 10 and Linux.
Could you please let me know what could be the cause of this?
The text was updated successfully, but these errors were encountered: