-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Vulkan Clustered: ReflectionProbe roughness is affected by global Texture Mipmap Bias #65690
Comments
сс @Calinou |
It looks like FXAA and TAA affect rendering within the reflection probes, but this may be intended to improve reflection smoothness. It does look strange on higher roughness values, but that's the price to pay to avoid aliasing in low-roughness reflections. See also #49789. On the other hand, not using FXAA/TAA within reflection probe rendering should speed up their rendering noticeably, with only a small decrease in quality in low-roughness reflections. This also applies to some other tonemapping effects, such as debanding. Disabling them within reflections may be a better tradeoff if possible. The resolution scale issue may not be caused by resolution scale itself, but by very low 3D buffer resolutions instead. See also #64683.
Vulkan Mobile doesn't support TAA, and FXAA may not be working either. |
When using a low resolution scale on a low-resolution viewport (e.g. in a small window), the final 3D buffer size will be very small (around 240p). It's difficult to properly generate reflection probe mipmaps at such a low size. |
Why would ReflectionProbe resolution depend on the viewport resolution? ReflectionProbes have their own project setting that determines their resolution. EDIT: I did a quick test, and building the cubemaps at 0.25 viewport scaling in project settings indeed has no effect on the cubemap resolution, but does have a minor effect on the appearance of the ground texture (mipmapping? AF?) |
By happenstance, I messed with the Texture Mipmap Bias setting in another project and noticed that it also affects the mips of ReflectionProbes. Lo and behold the tooltip flat out states that this is the cause of the problem: These auto-offsets for FXAA/TAA and viewport scaling were implemented in #64223 and #64225, both by @Calinou, so it's very funny that they didn't realise. |
@BraqueDown Good catch 🙂 I think this can be fixed by using a different sampler for radiance cubemaps, one that does not take the mipmap LOD bias override into account: godot/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl Lines 1089 to 1093 in e82d66f
The same change should be carried over elsewhere in the shader (e.g. for fog rendering), and in |
On the subject of the mobile renderer, the bias slider doesn't seem to work when it's enabled, which would explain why this issue didn't occur there. |
Godot version
v4.0.alpha.custom_build [baded9f]
System information
Windows 10, Vulkan Clustered, Ryzen R5 3600, RTX 3070 (512.15)
Issue description
Enabling FXAA or TAA, or lowering the viewport's resolution scale causes reflections created by ReflectionProbes to reduce in apparent roughness. The size of the viewport itself doesn't affect anything. Also, raising resolution scaling above 1.0 doesn't affect it either.
ReflectionProbe.Scaling.mp4
This does not affect the size of the specular lobe, nor does it affect reflections from VoxelGI, SDFGI, or the sky cubemap.
This issue does not occur on the Vulkan Mobile backend.
Steps to reproduce
or download attached MRP and hit Play (F5).
Minimal reproduction project
ReflectionProbe Scaling Roughness Bug.zip
The text was updated successfully, but these errors were encountered: