Glass not recognised as transparent (for dof)

  • amoebae
  • Topic Author
More
5 years 8 months ago - 5 years 8 months ago #1 by amoebae Glass not recognised as transparent (for dof) was created by amoebae
I've been trying to help someone who is experiencing problems with dof in The Sims 4. The depth buffer seems to be working correctly for them (they showed me a picture with display depth enabled), but glass windows are treated as solid objects. This isn't happening for the majority of players who use ReShade (including me).

Here are two pictures to illustrate (the window on the right has no glass and is just an opening in the wall):

Warning: Spoiler!


In the top picture you can see dof is applied through the window opening on the right, but not on the left. In the bottom picture you can see the same scene with the display depth shader enabled.

They have tried several recent versions of ReShade.

Does anyone have any experience of this type of problem? Might there be a solution? It seems obvious the glass isn't being recognised as transparent, but whether that's to do with a faulty glass shader in-game, or a mesh problem, or a ReShade-related problem I don't know, and as I say this isn't affecting the majority of ReShade users of the game as far as I can tell.

(I've asked the person to test with as many different windows as possible to rule out it being a single mesh issue, and will update.)
Last edit: 5 years 8 months ago by amoebae.

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
More
5 years 8 months ago #2 by BlueSkyKnight Replied by BlueSkyKnight on topic Glass not recognised as transparent (for dof)
The glass is getting treated as a solid object. This also happens in many other games. This has to do how the game renders transparent objects. No solution and nothing seems wrong in this case.

Please Log in or Create an account to join the conversation.

  • amoebae
  • Topic Author
More
5 years 8 months ago - 5 years 8 months ago #3 by amoebae Replied by amoebae on topic Glass not recognised as transparent (for dof)
This was my first thought, but it's only happening to a small handful of people. Wouldn't you expect it to happen to everyone? Glass is treated as transparent for me (i.e. the background is blurred through it).

Edit: see it working as expected in my game (pic 1 = dof off, pic 2 = dof on, pic 3 = display depth)

Warning: Spoiler!


You can see we both tested it with the same window mesh.
Last edit: 5 years 8 months ago by amoebae.

Please Log in or Create an account to join the conversation.

  • moriz1
More
5 years 8 months ago #4 by moriz1 Replied by moriz1 on topic Glass not recognised as transparent (for dof)
in your first post, the view in the window is actually a texture painted on the window itself. in your second post, the window is actually functioning as a window. or in other words, the "fake" window in your first post has no depth data, because there's nothing there. to ReShade, it might as well just be an opaque wall.

Please Log in or Create an account to join the conversation.

  • amoebae
  • Topic Author
More
5 years 8 months ago #5 by amoebae Replied by amoebae on topic Glass not recognised as transparent (for dof)
It's the same window mesh though.

Trust me, your explanation is precisely what I explained to this person when they first asked me about this, because I never use dof through a window I just assumed it would be like that for everyone.

Here's my initial reply to them last Thursday:

Warning: Spoiler!


However, they then showed me a picture by someone else where it was working. So I tested it myself and sure enough it works for me too. With the same mesh that doesn't work for the person with the problem. It's the same window we're both using, with different results. This is why I'm so confused.

Please Log in or Create an account to join the conversation.

  • amoebae
  • Topic Author
More
5 years 8 months ago - 5 years 8 months ago #6 by amoebae Replied by amoebae on topic Glass not recognised as transparent (for dof)
Updating to say this issue is now fixed for the person who had it.

We don't know how it got fixed. They uninstalled ReShade through frustration, bought a new game expansion, and then on a whim reinstalled ReShade, and now it works.

Four things:

1) They had previously uninstalled and then installed several versions of ReShade in an attempt to fix this, so I don't know what was different this time if uninstalling and reinstalling was the cause of the fix.

2) They had previously repaired the game through Origin, which didn't fix it, so it's unlikely downloading and installing the new expansion forced a re-downloading of previously corrupted files that the repair didn't.

3) There's nothing in the game expansion that is an obvious fix, because dof has been working as expected for most other people since the beginning, regardless of what packs and expansions they have installed. The only thing I can think of here is a mismatch between patch version and the (absence of the) expansion had some unforeseen effect on the glass shader or window mesh transparency. That shouldn't happen, but when is anything to do with code straightforward?

4) I hope it's clear now this wasn't, as I explained three times, a simple "dof won't work through windows because it's a solid surface, suck it up" issue.
Last edit: 5 years 8 months ago by amoebae.

Please Log in or Create an account to join the conversation.

  • crosire
More
5 years 8 months ago #7 by crosire Replied by crosire on topic Glass not recognised as transparent (for dof)
ReShade'd depth buffer detection is dependent on a lot of factors, such as camera location, graphics settings, ..., so that it may select different depth buffers for different people. Games often render transparent objects after the rest of the scene was rendered, so it can happen that for some people ReShade selects the depth buffer used for scene rendering and for some it selects the buffer that was used afterwards to render transparent objects (in which all transparent objects will appear as solid objects).

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.