- Home /
Transparent cutout SSAO problem
I am creating a 2D game and started adding SSAO to make the edges of object clearer but it doesn't seem to work well with the transparent cutout material
This is what I get:
I want the ambient occlusion to surround the player itself rather than the plane the texture is on.
Answer by 1danielcoelho · Aug 29, 2016 at 09:22 AM
I had a similar problem and managed to figure it out, so if anybody else ever ends up here, maybe this can be of any help:
Unity's SSAO effect will re-render the objects in the scene to a depth map using different versions of the SSAO shader, according to the RenderType of the objects' shaders (in my case, "TransparentCutout").
This SSAO shader pass expects the texture used for the alpha cutout to be bound to the _MainTex of the object's shader. In my case, it was in another custom texture. Switching the two textures out and having _MainTex hold the alpha cutout meant that the SSAO shader could render it properly to its depth map and the problem was fixed.
I'm also have this problem.
This is strange but when I use "Cull: off", then only one side has this problem.
Any other ideas why this is happening??
Your answer
Follow this Question
Related Questions
Transparent Cutout Shader? 1 Answer
How to get rid of dark line on the edge of transparent pixels? 2 Answers
Transparent Texture2D 2 Answers
Unity iOS memory usage 0 Answers
Get sprites from a Texture2D 1 Answer