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

When no emission_texture is set on a BaseMaterial3D, it defaults to white instead of black after duplicating it #84139

Closed
Sekuta82 opened this issue Oct 29, 2023 · 1 comment · Fixed by #84303

Comments

@Sekuta82
Copy link

Sekuta82 commented Oct 29, 2023

Godot version

4.1.2.stable

System information

Windows 10, any rendering backend

Issue description

Not a new issue. Happens in earlier versions.

Enabling emission on a material3D works initially, when no texture is set, meaning it will use the emission color.
As the available blend modes are add and multiply, the unset texture will default to black. At least it appears to be that way.

This is fine, unless I duplicate the material in code. In that case, if I don't set a emission_texture, it will default to white, meaning any additive emission color will be just white.

This also happens in the preview when assigning and removing an emission texture from the material.
However, it will fix itself in play mode, just not when duplicated through code.

Steps to reproduce

Project attached.
There are 3 objects in the scene:

  1. material without emission texture
  2. material with emission texture assigned through script
  3. material without emission texture assigned through script

All 3 should look identical.

Minimal reproduction project

emission_texture.zip

@pracedru
Copy link

pracedru commented Nov 1, 2023

I also have this issue.
It might also be related that multiplication operator doesn't work at all on standard material.

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.

4 participants