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

ProceduralSkyMaterial doesn't update visually and stays completely white once a Cover Texture is added and removed #74259

Closed
jcommander opened this issue Mar 2, 2023 · 4 comments · Fixed by #75469

Comments

@jcommander
Copy link

Godot version

4.0.stable

System information

Windows 10, Forward+

Issue description

While checking out the ProceduralSkyMaterial and assigning a Texture to see the Effect, I noticed that after removing it, the Sky stayed completely blank/white instead of going to its set colors, changing the Sky's Colors or any other properties doesn't seem to reset the Sky to its Colors.
At this point you either have to reopen the scene in the editor or create a new ProceduralSkyMaterial for it to update properly.

Steps to reproduce

  1. Create a ProceduralSkyMaterial as the Sky Material for the current WorldEnvironment
  2. Assign a Cover Texture
  3. Remove the Cover Texture

Minimal reproduction project

N/A

@clayjohn
Copy link
Member

clayjohn commented Mar 3, 2023

It looks like there are two problems here:

  1. The generated shader code includes the sky cover even after the texture is removed. When the texture is removed the shader should revert back to the shader version not using the sky cover
  2. The hint_texture_default_black is providing a white texture for some reason.

@kamalesh0406
Copy link

Hi @clayjohn @Calinou, I am looking to make my first contribution to the engine. Can you assign this issue to me? Thank you!

@Zireael07
Copy link
Contributor

@kamalesh0406 Godot does not practice assigning issues. Just make a PR.

@ibotha
Copy link
Contributor

ibotha commented Mar 29, 2023

I have played around with this issue and it seems to be because the image is not set to nil if no image was provided to the setter, instead it sets it to "RID()". I have locally tested setting the sky_cover property on the material to "Variant()", that is to say "Nil", and the bug seems to be fixed. My PR is here #75469

@akien-mga akien-mga modified the milestones: 4.x, 4.1 May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants