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

Shadowmasks broken on Web exports when using RGTC texture compression #101711

Open
michaelharmonart opened this issue Jan 17, 2025 · 5 comments
Open

Comments

@michaelharmonart
Copy link

michaelharmonart commented Jan 17, 2025

Tested versions

Godot v4.4.beta1

System information

Godot v4.4.beta1 - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Thu, 02 Jan 2025 10:28:29 +0000 on X11 - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 3060 (nvidia) - AMD Ryzen 9 9900X 12-Core Processor (24 threads)

Issue description

Image
Currently in the beta build the shadow-masks are rendered incorrectly. Here I have the shadowmask mode set to Replace and you can clearly see the distance at which it switches to the shadow mask and there's a shadowed line.

Image
Here it is with the shadowmask mode set to None

Image
And with the shadowmask mode set to Overlay (notice how much brighter the people are, as they're lit dynamically and not with the lightmap)

and finally what it should look like (and what it looks like in the editor or when exported as an android build):
Image
shadowmask mode set to Overlay in android build

Hopefully this is possible to fix, shadowmasks are incredibly useful for web builds where performance is paramount.

Steps to reproduce

Create a scene with lightmap GI and the shadowmask mode set to replace or overlay and notice the broken shadows.

Minimal reproduction project (MRP)

Here's a simple MRP with the same behavior shown (shadowmasks broken only on web builds):

Image

shadowmask-test.zip

@michaelharmonart
Copy link
Author

@BlueCube3310 you might have an idea of what is going wrong here?

I'm assuming it's some shader code errors beyond my ability to diagnose 😅

@BlueCube3310
Copy link
Contributor

Looks like the shadow texture doesn't get initialized properly and is fully black, I'll look into it

@BlueCube3310 BlueCube3310 moved this from Unassessed to Very Bad in 4.x Release Blockers Jan 17, 2025
@BlueCube3310
Copy link
Contributor

Update: This is likely related to RGTC compression. Changing the shadowmask's compression mode to VRAM uncompressed works correctly

@michaelharmonart
Copy link
Author

I can confirm that Changing the shadowmask's compression mode to VRAM uncompressed works for my application as well.

I'll use that as a workaround for now.

Much appreciated!

@akien-mga akien-mga changed the title Shadowmasks broken on Web Exports Shadowmasks broken on Web exports when using RGTC texture compression Jan 17, 2025
@BlueCube3310
Copy link
Contributor

This seems to specifically happen when using array textures with RGTC. Other formats seem to work fine, and regular 2d textures work correctly too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Very Bad
Development

No branches or pull requests

3 participants