Jump to content

Early Z-Pass in Vulkan


Josh

4,697 views

 Share

Vulkan is pretty wonderful because I can take all the optimal techniques I worked out in OpenGL and it just makes everything much faster. I've successfully completed the implementation of early Z-pass, which is important for our lighting system. We are using a forward clustered renderer, similar to the technique id Software's new DOOM games use. Because the fragment shader is fairly intensive, a depth pre-pass is rendered to ensure we only process each screen pixel once.

Untitled.thumb.png.a52ccd0a5f0619c0ae2a5c78de65e7b1.png

This technique also easily supports transparency with multiple layers of shadows.

b2e06c1f25a428aa0c87b56cf7d2a717.thumb.jpg.bbd530aafb1f0453c81570352350a685.jpg.a97520fab7d1799fccec4dcb873a096f.jpg

Vulkan has a feature called subpasses specifically designed for this type of functionality. It's really fantastic to have this kind of fine control over the hardware, even if it does involved some pretty convoluted code.

You can read more about this rendering technique below.

 

  • Like 2
 Share

1 Comment


Recommended Comments

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...