Closed chiraagChakravarthy closed 1 year ago
The specification defines this quite clearly in the glsl 3.30 spec (section 8.3):
min(x, y) Returns y if y < x, otherwise it returns x.
So this seems like a bug in the macos/intel driver. Not sure if apple is still fixing issues in their OpenGL implementation so it might be hard to get them to fix the issue.
Since this is an implementation bug, and no OpenGL/ES spec change is needed, closing.
glsl version: 330 lwjgl version: 4.5 gpu: Intel HD Graphics 6000 1536 MB os: macOS Sierra 10.12.6
When using the min/max function in a shader, the lower bits of the mantissa changes and creates artifacts in rare cases, but when using the mix function in a similar way it doesn't.
In the example above, when c and d are different, d is correct and c is slightly off.