OpenGL’s glViewport vs Metal’s setViewport

As mentioned in the previous post, clipping happens after the vertex gets transformed into NDC space, and in OpenGL this is defined as 2x2x2 cube, while in Metal this is defined as a 2x2x1 cube. I had some trouble with enabling depth test due to my setting with setViewport in Metal. Going back to OpenGL, Read more about OpenGL’s glViewport vs Metal’s setViewport[…]

OpenGL Multiple Rendering Targets

Multiple Rendering Targets (MRT) are often useful for screenspace approaches such as deferred shading and fast ambient occlusion approximation (SSAO), which requires you outputing a number of Graphics Buffers a.k.a G-Buffers from your shader in rendering pass. A G-Buffer is typically used to store information of objects such as RGBA color, normal, or depth information Read more about OpenGL Multiple Rendering Targets[…]