I’m following Ray Tracing In a Weekend, and would like to implement this in Vulkan. In Chapter one, we iterate through all the fragments and color them. Here is the resulting image from vulkan, versus one made in ShaderToy. Both same fragment shader
And from ShaderToy
As you can see, the image seems to be flipped.
Things that I have tried.
Invert gl_Position.y in fragment shader. No change to output.
Invert viewport.y and submitting vkCmdSetViewport(), no change to output.
What must I be doing wrong? Or is the underlying problem something else? Any input would be appreciated, thank you.
EDIT: The correct output should be the one from ShaderToy.