godotengine / godotengine/godot
Subsurface scattering causes ghosting on nearby objects, worse with 4.3 master.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.3 dev [8ff821670561466a5ff72044ad574dcb955b66c2]
### System information
Windows 11 - Vulkan - Nvidia RTX 4070 - intel i5 13600KF
### Issue description
Subsurface scattering can cause ghosting.
~~For some reason the bluring causes ghosting, at highest quality settings it's the worst. The objects in question are near the camera and the far distance is set to over 20 units but the DOF distance itself doesn't matter.
I set up settings up such as glow and autoexposure to make it better visible, it happens without it too but depending on the background color it might be difficult to see, TAA makes it flash a lot constantly which makes it even worse - change values in camera attributes in exposure, particularly scale and speed and some other to make it flash like crazy to see if you have torubles).~~
**Some regression perhaps?**
This was already happening in 4.2.1 but it got worse in 4.3, both occurences are annoying.
(Screenshots are scaled up to show where the issue is clearly - around cpasule and the other shapes - my project itself is at full hd so it's not a low res issue, it's also just as visible at larger res as it is in these screens)
**4.2.1:**

**4.3 master images:**


(second image is from the MRP, the other are from my project)
Ghosting in video (I zoomed in a bit to make it easier to see around the capsuleand the red mesh but it's just as visible from distance too I only wanted to isolate this part of the video to make it clear what I'm talking about.):
https://youtu.be/SrBSVaI9QxE
It flashes with TAA enabled a lot in 4.3 (not sure if this is expected or if it's a bug and should be here or in a separate report?):
https://youtu.be/XUSraUwzzmc
Lower quality blur settings help (I assume it's still happening but on a such a smaller scale it's not easily visible in my test cases?)
One last note, the ghosting happens even before the far objects start getting blurred, I'd expect it to work the other way around that the closer the blur distance gets to the capsule the more likely the issue would happen but nah first the ghosting and then eventually the distance objects get blurred as I increase the blur distance.
### Steps to reproduce
1. Open the MRP and check the camera preview.
2. Play with camera attributes - blur distance, auto exposure settings.
3. Enable/disable TAA.
### Minimal reproduction project (MRP)
[BlurTest.zip](https://github.com/godotengine/godot/files/14320180/BlurTest.zip)
Contributor guide
Research direction
Open the attached BlurTest.zip minimal reproduction project and inspect the camera preview with subsurface scattering enabled. Reproduce the ghosting while changing blur distance, auto exposure, and TAA, comparing the 4.2.1 and 4.3 results. Done means the nearby-object ghosting and excessive TAA flashing are resolved without regressing the reported blur behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100