Vulkan - scissor calculations for negative viewport?

Viewed 126

If I'm using a negative viewport in Vulkan to flip to OpenGL orientation, should I do something to scissor calculations too if I'm expecting behavior similar to OpenGL?

1 Answers

The scissor rectangles are specified in framebuffer coordinates, which are the post-viewport coordinates of a fragment. So even if you negate the viewport rectangles, the scissor boxes won't need to change.

Of course, that means you don't get OpenGL behavior. But it shouldn't be difficult to do some simple match from OpenGL coordinates to Vulkan framebuffer coordinates.

Related