Open varianttombstones opened 2 weeks ago
@varianttombstones Please create and join a minimal reproduction project. I was about to test your issue, but there's no project file.
@varianttombstones Please create and join a minimal reproduction project. I was about to test your issue, but there's no project file.
Hey @adamscott , I have attached an MRP it's not specifically web exports the issue is present across the entire compatibility renderer.
It seems to be related to the litteral "shading", as unshaded renders flawlessly.
Unshaded | Per-pixel / Per-vertex |
---|---|
Just found out that if you add a light source in Compatibility, it lights/shows up properly. It's not related to the texture size. I renamed the issue in consequence.
In web debug (Waterfox, but has been tested on Chrome, Edge, Firefox, etc, same result):
There's a shadow being cast, so default lighting is working. The plane also has a blue-ish hue, so it's taking the environment lighting in.
That said, remember that default lights don't apply to the running project, only the editor. It's why you need to add a DirectionalLight3D node from the editor preview. OP already did this because their lighting is working correctly when running the project on Windows.
I tried the MRP locally. There's no lights in the main scene.
I found the issue: when using Compatibility, the radiance map doesn't update according to the Default Clear Color project setting.
If you set the clear color in _ready()
instead (or even in _init()
), it'll work:
RenderingServer.set_default_clear_color(Color(1, 1, 1))
I tried the MRP locally. There's no lights in the main scene.
* the cube is black on _Compatibility_ * the cube is lit on _Forward+_
I want to alert both of you to the fact that my post originally said the issue is when testing web exports, I forgot to add lighting and got confused, so I guess it's 2 issues as I just tested the web exports based on both of your comments and even with lighting it renders pitch black just for 1 pixel thin textures.
Just found out that if you add a light source in Compatibility, it lights/shows up properly. It's not related to the texture size. I renamed the issue in consequence.
Desktop Testing Web Testing
Both have lighting. On the web export, texture size is still a problem.
The issue is likely fixed in 4.4.dev by properly handling VRAM-compressed textures that have a size that isn't a multiple of 4 pixels (the texture in the MRP is 1×10). In the meantime, switch to Lossless compression in the Import dock (you won't save any meaningful amount of VRAM on such a small texture anyway, it only loses quality).
Oh perfect! Could someone confirm its fully fixed on 4.4dev and then close the issue please, I tried but I couldn't get the web export template to run on 4.4dev, I might be able to check again later.
Tested versions
System information
Windows 10 - v4.3.stable.steam [77dcf97d8] - Replicates on OpenGL
Issue description
If you set a StandardMaterial3D's texture to a 1 pixel thin texture and apply it to a mesh, it will render the mesh's material as completely black when playing via web.
In Editor as a single pixel thin texture:
In Desktop debug (Windows):
In web debug (Waterfox, but has been tested on Chrome, Edge, Firefox, etc, same result):
Steps to reproduce
Minimal reproduction project (MRP)
minimal-reproduction-project.zip