Results 1 to 2 of 2

Thread: Using MSAA with depth pre-pass (forward+)

  1. #1

    Question Using MSAA with depth pre-pass (forward+)

    I'm using forward+ rendering with a depth pre-pass and everything works just fine as long as I don't use multisampled images.
    Once I enable MSAA, I get a strange smear-effect everywhere:
    https://youtu.be/Jo59mC64xP8

    (MSAA is disabled for the first two seconds, the artifacts appear once I enable it. The top left shows the contents of the depth buffer (linearized) after resolving it.)

    If you look closely you can see that the skybox is being rendered perfectly fine both before and after MSAA is enabled.
    That's because the skybox shader has both the depth write and depth test disabled, that's why I'm pretty sure the artifacts are related to the depth buffer.

    All other shaders have depth write disabled and depth test enabled with a VK_COMPARE_OP_LESS_OR_EQUAL compare operation.
    If I disable the depth pre-pass and enable depth-write regularly in the main pass it works just fine.


    Is there anything special I need to be aware of when using multi-sampled depth buffers? Is it even valid to use a pre-rendered multi-sampled depth buffer as a read attachment?

  2. #2
    Problem solved, I forgot to change the rasterizationSamples of the VkPipelineMultisampleStateCreateInfo for the depth pre-pass...
    After changing it everything seems to be fine!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean