Skip to content
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

SSR roughness produces strange horizontal streaks, especially visible when using Normal Maps #67245

Closed
unfa opened this issue Oct 11, 2022 · 5 comments · Fixed by #72838
Closed

Comments

@unfa
Copy link

unfa commented Oct 11, 2022

Godot version

4.0 beta 2

System information

Windows 10 / Arch Linux; Vulkan, Clustered+, AMD Radeon RX6800XT

Issue description

Screen-Space Reflections respond to roughness by blurring on one axis, which produces strange horizontal streaks, especially when using a normal map. For best case scenario I've set SSR to use highest quality.

Roughness = 0:
image

Roughness = 0.25:
image

Roughness = 0 + normal map:
image

Roughness = 0.25 + normal map:
image

Roughness = 1.0 + normal map + roughness map:
ShareX_sOzLOPsCWT

Let me tweak the floor material to make the reflection more visible:

Roughness = 1 + roughness map:
image

Roughness = 1 + normal map + roughness map:
image

These streaks are even more distracting in motion, as they flicker back and forth.

Steps to reproduce

  1. Enable SSR
  2. Make your material reflective but a bit rough
  3. Add a normal map to vary the surface normals
  4. Observe the strange horizonal streaks

Minimal reproduction project

SSR Test.zip

@unfa
Copy link
Author

unfa commented Oct 11, 2022

Accidentally I've found a really interesting talk about SSR and I think it could be of use in the effort to improve that feature in Godot:

Presentation:
https://www.youtube.com/watch?v=AzXEao-WKRc

Slides:
https://www.ea.com/frostbite/news/stochastic-screen-space-reflections

@groud groud added this to the 4.0 milestone Oct 11, 2022
@unfa
Copy link
Author

unfa commented Oct 11, 2022

I wonder - does it make sense to use O3DE's code?
Maybe some of the rendering code could be taken from there and adapted to Godot, or at least used as a close reference.

They boast about their rendering, and it could save Godot devs a lot of time figuring stuff out from scratch, when maybe shader code for screen-space effects could be at least partially reused?

The engine is licensed under Apache 2.0 or MIT: https://github.com/o3de/o3de it's also made in C++ like Godot.

@unfa
Copy link
Author

unfa commented Jan 13, 2023

This issue is still present in Beta 12:
image

@Calinou
Copy link
Member

Calinou commented Jan 13, 2023

I can confirm this on 4.0.beta12 (Linux, GeForce RTX 4090 with NVIDIA 525.60.11).

Some observations:

  • Enabling 16× anisotropic filtering on the texture SSR reflects on doesn't affect streaks.
  • Streaks are more noticeable with heavy SSR settings (lots of steps, fade in/fade out that makes reflections more visible). At the default settings, they're not that noticeable as reflections are shorter.
  • Adjusting Max Steps, Fade In, Fade Out, Depth Tolerance has no effect on the streaks.
  • Disabling Screen Space Roughness Limiter in the advanced Project Settings has no effect on the streaks.

image

@akien-mga
Copy link
Member

Still reproducible in 4.0 RC 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants