▲ 58 r/vulkan+2 crossposts

Reverse-Z is the perfect hack

I shelved a Reverse-Z branch in my engine (stuck on OpenGL 4.1 for macOS, no glClipControl), and the roadblock sent me down the rabbit hole of actually understanding why it works instead of just how to implement it.

I ended up writing about what I learned with interactive graphs and all:
https://www.shlom.dev/articles/reverse-z-perfect-hack/

Happy to hear where I got things wrong or imprecise.

Hopefully this helps someone else :)

reddit.com
u/shlomnissan — 5 days ago
▲ 14 r/GraphicsProgramming+1 crossposts

Finally landed PBR + IBL in VGLX 🎉

https://i.redd.it/mr3ex3262b8h1.gif

Image-based lighting is finally working in VGLX.

The whole split-sum pipeline is in:

  • equirect HDR to cubemap
  • diffuse irradiance convolution
  • GGX specular prefilter (roughness to mip chain)
  • BRDF integration LUT

All of it baked with fragment-shader passes into cubemaps via FBOs, no compute shaders, since VGLX targets OpenGL 4.1 (macOS tops out there so compute isn't on the table until I rewrite the backend in Vulkan).

It's all hand-written C++ and GLSL, no code generation which took time to get right but I wanted to actually work through the math myself rather than paste it in and hope.

The classic sci-fi helmet never gets old as a test model.

reddit.com
u/shlomnissan — 17 days ago