Hello!
I’ve been able to integrate the Vulkan SDK in an application where I already have OpenGL working. I’ve managed to get all GLSL sources conformed for both platforms, so maintaining shaders for both platforms is really easy.
Renders are almost identical between both APIs, but I’m experiencing a significant gamma difference between OpenGL output and Vulkan output; running Intel’s latest Mesa driver on Arch Linux (MacBook Air Haswell).
This is a draw test using a shader outputting 20% grey directly:
[ATTACH]112[/ATTACH]
The expected color for comparison:
[ATTACH=CONFIG]113[/ATTACH]
OpenGL’s output is much closer to the expected without any special pipeline configuration.
The odd thing, if I run the Vulkan fragment output through a 2.2 gamma-curve, this gives the expected result.
return vec4(pow(color.rgb, vec3(2.2)), color.a)
I’d like to know if there’s a way to match OpenGL’s gamma output outside the shader. If this isn’t possible with Vulkan’s pipeline, I’ll integrate a gamma ramp-texture to perform the correction, sparing the shader the pow() expense.
It’s also possible i’m missing a detail in setting up my pipeline / framebuffer attachments.