godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.72k stars 20.12k forks source link

When I made distance, the object become white in webgl #94779

Open NeonfireStudio opened 1 month ago

NeonfireStudio commented 1 month ago

Tested versions

System information

Windows 10 - Godot v4.3.dev6 - Vulkan (Forward)

Issue description

I am creating a 3D game. So there, an ocean contains many fish, but the eyes of the fish become white when I (the player) make distance from it; otherwise, if I come near him, then the eyes become black. It’s only happening in WebGL; all is well in OpenGL.

I think the text is enough, I not need to show any video.

When I runs the scene and back to the editor, I saw this screenshot:

piranha tscn - OceanLife_ Fish Royale - Godot Engine 26-07-2024 11_52_25 The eyes material are white, but how is this possible? the albedo color is black when I checked and then I saw this (after opening and closing the materials) piranha tscn - OceanLife_ Fish Royale - Godot Engine 26-07-2024 11_50_24 When I made more distance, the full body become white

One more information, I converted this project from Godot 4.1 to Godot 4.3 also I updated the mesh surface in tools

(I searched here, no issue related it is exist)

Steps to reproduce

None

Minimal reproduction project (MRP)

None

AThousandShips commented 1 month ago

Please provide some more information on your setup, how the material is set up, please upload an MRP

You're probably using a feature not available in the gles backend, but without any details it's hard to tell

NeonfireStudio commented 1 month ago

Here is a screenshot of the material: piranha tscn - OceanLife_ Fish Royale - Godot Engine 26-07-2024 13_23_12

I used this shader as sky

Here is gameplay in Google Drive:

OpenGL (All is well)

WebGL (The problem)

The video quality are low

Also there is some more webgl glitch that I am trying to fix like the parachute not disappears

AThousandShips commented 1 month ago

Gotcha! Misread your "all is well in OpenGL" as "as well"

AThousandShips commented 1 month ago

Can you please try in rc1, dev6 is old and things might be fixed since

NeonfireStudio commented 1 month ago

Unfortunately, Its not working. I have a plan to release this game today, but I need to fix this issue

AThousandShips commented 1 month ago

Hopefully this can be looked into, can you confirm this also breaks in 4.2.2? (If it doesn't it's a regression and might be fixed in 4.3, otherwise it'll be fixed in 4.4 and cherry picked for 4.3.1)

NeonfireStudio commented 1 month ago

I converted the project to Godot 4.2.2 but some scenes got corrupted. Otherwise I need to keep this glitch in my game as I need Godot 4.3 for upload my game on Crazygames, but its not a worst glitch for my game. Thank You for helping me!

NeonfireStudio commented 1 month ago

Is there no way to fix that? It's not happening with sharks, only with other fish.

Here is the shark model Here is the other fish models

AThousandShips commented 1 month ago

This seems to be a configuration error then likely, so I'd suggest asking in the forums etc. for help instead, unless you can confirm this is an engine bug

But unfortunately there's still very little information to go by for debugging this, so please try and add more information, an MRP would be necessary

NeonfireStudio commented 1 month ago

I can confirm it is an engine bug because its working on Godot 4.1 but not in Godot 4.3 (WebGL)

What more details I can give?

AThousandShips commented 1 month ago

Some data, some files, a few screenshots of just the editor and the results is very little to go by

And just to confirm, when you say it works in opengl you are talking about running with the Compatibility backend, not the Forward+ backend, correct? And does it work with OpenGL in 4.1?

NeonfireStudio commented 1 month ago

Ok, I will try to add some files,

Yeah, I am running on Compatibility, and I have tested this in Godot 4.1 with Forward+, its working well but not in WebGL of Godot 4.3

NeonfireStudio commented 1 month ago

I will upload the files soon, otherwise please can you tell me, I can make another issue on transparency of a mesh not working on Godot 4-4.3 webgl

AThousandShips commented 1 month ago

If it's unrelated to this then go ahead and make an issue, but please include an MRP from the start