-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen-Space reflections (SSR) are semi-transparent. #79549
Comments
@WrobotGames Please upload a minimal reproduction project to make this easier to troubleshoot. (While you're at it, please also upload the equivalent Blender project 🙂) Also, can you reproduce this in 3.5.2? |
…o metallic and SSR Commit 2c000cb changed the interpolation limits from (0.04, 1.0) to (0.04, 0.37). This is incorrect, as we want to have an F0 of 0.04 for dielectrics (materials with metalness of 0.0) and an F0 of 1.0 for metals. The Schlick approximation uses an F0 of 0.04 for all dielectrics and it's good enough. Having it lower than 1.0 leads to an incorrect application of the Fresnel effect for metals and leads to bugs like godotengine#79549
First, note that the sky reflections on the three horizontal quads are not due to SSR (from what I gathered they come from IBL on the cubemap). SSR is a post-processing effect so it is applied on top of what is seen here. The SSR shader has an output alpha value responsible for the reflections' opacity.
And got this: This gives us more plausible results but we do not want to erase the Fresnel effect completely. In the real world, surfaces are more reflective when we look at them at small grazing angles which is exactly what this effect represents. Note that the non-metallic quad (on the right in all pictures except the last one where it is on the left) still shows a semi-transparent reflection. I guess you could hack it and tweak the F0 value based on roughness but it would not be physically correct. |
Fixed by #79624. |
I can confirm the sky reflection is still visible through on 4.2.dev 6588a4a, even at very low background energy: The only way to get rid of it is to set Reflected Light to Disabled, but this disables all sky reflections. |
…o metallic and SSR Commit 2c000cb changed the interpolation limits from (0.04, 1.0) to (0.04, 0.37). This is incorrect, as we want to have an F0 of 0.04 for dielectrics (materials with metalness of 0.0) and an F0 of 1.0 for metals. The Schlick approximation uses an F0 of 0.04 for all dielectrics and it's good enough. Having it lower than 1.0 leads to an incorrect application of the Fresnel effect for metals and leads to bugs like godotengine#79549
This issue is a lot less apparent now with the pr. (The issue is gone when setting fade in/out to 0) But its kinda still there with the default settings. (I think this is the expected behavior though) Should the issue be closed? |
That's expected, as SSR isn't fully opaque with the default settings due to fade in/out. I think this has been resolved to the best of our abilities given the default settings (which we can't change to preserve existing projects' artistic intention). |
Godot version
v4.1.stable.official [9704596]
System information
Godot v4.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 31.0.15.3640) - Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 Threads)
Issue description
The screen space reflections are semi-transparent.
The problem occurs on any reflective surface (any material with a low roughness). The reflection seems to be more transparent the darker the color of the reflected object.
![afbeelding](https://private-user-images.githubusercontent.com/66079814/253809204-287f0a28-a4c1-4143-a3c1-a33c4d279efb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzIzMTksIm5iZiI6MTczOTEzMjAxOSwicGF0aCI6Ii82NjA3OTgxNC8yNTM4MDkyMDQtMjg3ZjBhMjgtYTRjMS00MTQzLWEzYzEtYTMzYzRkMjc5ZWZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIwMTMzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0YjZhOGJhZjM3OTQzZmZkNTZjYzE5NzM2Mzk5MGZlMjA3OTdjNjM3ZmZjOTdhZjk5MjNlZWRhNmE3YWExYWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.BaqcFs7R4T9lhhvrQWZyVfXee3qzAKif4XfV3fTrxtQ)
The sky should not shine through the reflection of the 2 cubes.
Here are a few examples of what the reflections should look like
(Blender Eevee)
![afbeelding](https://private-user-images.githubusercontent.com/66079814/253810017-1d384851-5816-4ea1-8e5e-41e2a98576ff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzIzMTksIm5iZiI6MTczOTEzMjAxOSwicGF0aCI6Ii82NjA3OTgxNC8yNTM4MTAwMTctMWQzODQ4NTEtNTgxNi00ZWExLThlNWUtNDFlMmE5ODU3NmZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIwMTMzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI5ZjJjYTZhMzkzMzFmOTg5ZjYzMDJiN2ZkOTg5ZDc1NmRiNTE3NDk2Njk1OWMxMmVjMzRhMWJmMmQ1MzU0NWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hscQWd5_ac5048ImQX0KvwBKtUjqgrCzm-lqp5vBiyY)
![afbeelding](https://private-user-images.githubusercontent.com/66079814/253809973-256b4190-73be-4df8-ad5f-694af796de60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzIzMTksIm5iZiI6MTczOTEzMjAxOSwicGF0aCI6Ii82NjA3OTgxNC8yNTM4MDk5NzMtMjU2YjQxOTAtNzNiZS00ZGY4LWFkNWYtNjk0YWY3OTZkZTYwLn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MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.WDS4_bW5Pi_NHXU_2ff_CnO3owU0WsyJ1x6eM_ieMac)
(Blender Eevee, with the mirror is tinted red to show whats reflection and whats not)
(Blender cycles)
Steps to reproduce
(The issue shows up in every single material with a low roughness, but it becomes really clear with this material.)
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: