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[…]

Metal API, vertex interleaved buffer

Haven’t updated my blog for years, here’s a new beginning. Started playing around with Apple’s Metal API recently, and found a lack of information on vertex interleaved buffer, so I thought I could write a post about this helping others who also had issues using an interleaved buffer. As to why I want an interleaved Read more about Metal API, vertex interleaved buffer[…]

My Fabric Shader

I’m currently working on a real-time fabric rendering shader for my dissertation as part of my Honors degree. For this project, I found a couple of existing fabric rendering approach, implemented and modified one of them in GLSL for my purpose. You can find my survey for real-time fabric rendering techniques in here. This shader Read more about My Fabric Shader[…]

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[…]