Facepunch / sbox-issues

175 stars 12 forks source link

Ambient Occlusion draws over everything #5690

Closed Nolankicks closed 4 months ago

Nolankicks commented 4 months ago

Describe the bug

When using the ambient occlusion post processing component. It draws over everything.

To Reproduce

  1. Use a model using ambient occlusion.
  2. Put it in front of the camera.
  3. Look though it seeing the occlusion seeping though.

Expected behavior

It should not draw over it.

Media/Files

https://discord.com/channels/833983068468936704/833983416390385685/1253153155244621896

image image image

Additional context

No response

handsomematt commented 4 months ago

What else are you doing because this doesn't happen for me. AO draws after the opaque pass since it only affects opaque objects. Do you have strange transparent flags? Are you using multiple cameras?

Nolankicks commented 4 months ago

What else are you doing because this doesn't happen for me. AO draws after the opaque pass since it only affects opaque objects. Do you have strange transparent flags? Are you using multiple cameras?

Not using any second camera, just looking through the "facepunch.ticket_dispenser" prop, without doing anything. Even happens while in the editor.

https://github.com/Facepunch/sbox-issues/assets/95300917/793dddc3-06bd-4a7a-8a9d-243424d77abe

https://github.com/Facepunch/sbox-issues/assets/95300917/592b590b-25c7-4128-96fb-67db73bb7a8f

https://github.com/Facepunch/sbox-issues/assets/95300917/00ba41ee-6a68-4da2-8f77-c43d77e9b8e1

bakscratch commented 4 months ago

Seems like it was due to the Ticket machines using "Static Overlay" shader for the text and icons

handsomematt commented 4 months ago

Yeah that model was poorly configured. SSAO works on the opaque layer only, objects with translucency do not write to depth and can not have their ao calculated, this is standard across all engines.

image

Citizen works fine for me

Nolankicks commented 4 months ago

For me, it happened after looking through the model ticket model for the ao on the citizen to look transparent.