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

Specular aliasing becomes more visible when depth of field or glow is enabled #15756

Open
lukaskotik opened this issue Jan 15, 2018 · 12 comments

Comments

@lukaskotik
Copy link

Godot version:
Godot 3.0 rc1 official

OS/device including version:
Ubuntu 16.04 64 bit
GeForce GTX 750 Ti, NVidia driver 384.111

Issue description:
Graphical artifacts are visible (for some viewing angles and zoom levels) when Dof Far Blur or Dof Near Blur in environment is enabled. These artifacts are placed in the areas of "high" reflections (see images).

Steps to reproduce:
Open 3D material_testers demo, enable Dof Far Blur and Dof Near Blur, try to zoom in/out, rotate camera. Make the same in the running scene. (artifacts are visible both in editor and in running scene).

Artifacts:
godot_reflection_artifacts
Blur off:
blur_off
Blur on:
blur_on

Minimal reproduction project:

@groud groud added this to the 3.0 milestone Jan 15, 2018
@reduz
Copy link
Member

reduz commented Jan 16, 2018

This is technically not a bug, just the shape of the filter because the resulting specular lobe at this size is very strong. Maybe specular could be clamped or eventually be applied after tonemapping. Easy fix for now is changing roughness from 0.02 to 0 or 0.05 (a bit bigger)

Will mark as enhancement for 3.1

@reduz reduz added enhancement and removed bug labels Jan 16, 2018
@reduz reduz modified the milestones: 3.0, 3.1 Jan 16, 2018
@lukaskotik
Copy link
Author

It's quite irritating shape of the filter - see the first picture or the most right artifact in the last figure. Anyway I played with settings of environment and I can't get rid off these white rectangles (without affecting the blur effect). What do you exactly mean with "changing roughness"?

@AndreaCatania
Copy link
Contributor

roughness of spatial material on the single mesh

@lukaskotik
Copy link
Author

Thanks! Setting it to 0 removed the artifacts (together with the reflection). With higher values the artifacts still occur.

@akien-mga
Copy link
Member

Is this still reproducible in the current master branch? What about the GLES2 backend?

@Calinou
Copy link
Member

Calinou commented Jan 26, 2019

I can still reproduce it on commit 35c1694 with the default parameters (roughness 0.02):

image

Setting the material's roughness to 0 solves the issue, since the specular blob doesn't appear anymore. Also, depth of field isn't supported in GLES2, so the issue doesn't apply there.

@akien-mga
Copy link
Member

Still reproducible in 4163419:
Screenshot_20191114_115745

WIth higher roughness I get artifacts in other locations (foot):
Screenshot_20191114_115820

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Nov 14, 2019
@akien-mga
Copy link
Member

Still reproducible in 3.3-stable. CC current @godotengine/rendering contributors in case you want to poke at this one :)

@Calinou
Copy link
Member

Calinou commented Apr 23, 2021

Note that this is most likely not reproducible in the master branch since it has a new DoF implementation with proper support for bokeh.

@clayjohn
Copy link
Member

This is a form of specular aliasing resulting from the high intensity of the specular lobe.

To fix these sorts of artifacts what we need to do is convert the buffer to LDR before performing the blur operation then convert back to HDR after blurring. We should do something similar with Glow to reduce specular aliasing.

@Calinou Calinou changed the title graphic artifacts with blur filter in environment Specular aliasing becomes more visible when depth of field or glow is enabled Jan 2, 2022
@Calinou
Copy link
Member

Calinou commented Jan 4, 2022

This was fixed for glow in master by #54409. I haven't checked if this applies to depth of field in master yet.

@clayjohn
Copy link
Member

clayjohn commented Jan 4, 2022

Right now it was just added for glow, but the same concept applies for DoF.

@clayjohn clayjohn added this to the 4.x milestone Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants