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

Proximity Fade causes SpatialMaterials to not render in HTML5 with GLES2 #64081

Open
AzedaxenSoftware opened this issue Aug 7, 2022 · 4 comments

Comments

@AzedaxenSoftware
Copy link

Godot version

3.5.stable, 3.4.5

System information

Pop!_OS 22.04/Windows 10, GLES2, Firefox/Edge

Issue description

With the GLES2 backend, SpatialMaterials with Proximity Fade enabled don't render at all in HTML5.

In the web editor, the error drivers/gles2/rasterizer_storage_gles2.cpp:5665 - MSAA not supported on this hardware. is printed every time Proximity Fade is toggled in the inspector.

Steps to reproduce

Export and run the minimal reproduction project in HTML5. The red cube has Proximity Fade enabled and will be invisible in HTML5. The blue cube does not have Proximity Fade enabled and should remain visible.

Minimal reproduction project

proximity_fade_bug.zip

@Calinou
Copy link
Member

Calinou commented Aug 8, 2022

I can reproduce this on 3.5 (Firefox 102, Linux, NVIDIA 515.57):

image

My guess is that the browser isn't liking that Godot samples the depth buffer for proximity fade (whose support is not mandated in GLES2), and prints an unrelated error.

@clayjohn
Copy link
Member

In the web editor, the error drivers/gles2/rasterizer_storage_gles2.cpp:5665 - MSAA not supported on this hardware. is printed every time Proximity Fade is toggled in the inspector.

I think this is unrelated. That error message only pops up when MSAA is configured for a viewport. I think chances are the editor preview is being regenerated each time the setting changes and it has nothing to do with the issue.

Calinou's screenshot shows the issue more clearly, the material is trying to read from depth and write to it at the same time. Reading from depth is not really well supported in GLES2.

I guess we could try adding a framebuffer with no depth that renders to the main color buffer to avoid this issue.

@Calinou
Copy link
Member

Calinou commented Aug 11, 2022

I think chances are the editor preview is being regenerated each time the setting changes and it has nothing to do with the issue.

To avoid these errors, should we disable MSAA for the inspector preview in the web editor (at least in GLES2)?

@clayjohn
Copy link
Member

I think chances are the editor preview is being regenerated each time the setting changes and it has nothing to do with the issue.

To avoid these errors, should we disable MSAA for the inspector preview in the web editor (at least in GLES2)?

Yep!

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

4 participants