#Defaults for bevy SSAO

9 messages · Page 1 of 1 (latest)

fleet ether
#

I'm just wondering what the minimum properties on the mesh are that are required for SSAO to work.

Using pub struct ScreenSpaceAmbientOcclusionBundle from the pbr crate.

Might be a bit of a noob question, but does it require Verts, incidies, uvs and normals from the Mesh::ATTRIBUTE_NORMAL for example.

My current issue is I've applied my own shaders using the implementation of Material for said custom mat.

sage ravine
#

You need to write normals and depth to the normals and depth prepasses

#

If you're using a custom material, make sure you have code for the prepasses

fleet ether
#

Sweet thanks!

fleet ether
#

@sage ravine anything else that needs to be set? I've added both to the prepass but still no result. Does there need to be anything in the main shader? Or uv's possibly?

sage ravine
#

Oh wait do you want SSAO to apply to your material, or your mesh to be included in the SSAO calculations?

#

If you want SSAO to apply to your material, you need to sample the texture and use it

fleet ether
#

I can't seem to get it to work on the material no matter what I try. There's no texture, just solid color, but unsure as to why

sage ravine
#

Check the SSAO texture during your material's draw call for the shading pass in renderdoc and see what it looks like