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

[BREAKING] Remove StandardMaterial.ambientTint #6805

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Jul 11, 2024

Marked as breaking as it has a potential to change the brightness of the scene. The workaround is to set the tint to WHITE.

  • remove the ambientTint property, and make it behave as always true
  • change the default value from grey to white, to make it a noop when multiplied by the scene ambient

@Maksims
Copy link
Collaborator

Maksims commented Jul 11, 2024

This one potentially has the biggest chance to affect scenes (compared to diffuseTint and emissiveTint).

Tested projects with this code:

editor.assets.list().filter((a) => {
    return a.get('type') === 'material'
        && a.get('data.ambientTint') === false
        && (a.get('data.ambient.0') !== 1 || a.get('data.ambient.1') !== 1 || a.get('data.ambient.2') !== 1);
}).length;

In our existing projects, it will affect 70-100% of materials.

@mvaligursky
Copy link
Contributor Author

Yep, same as with the other tints, we'll process the project as they switch to V2 of the engine, and if the ambientTint was false, we'll set the ambient color to 1,1,1. So that should solve majority of Editor projects.

@mvaligursky mvaligursky requested a review from a team July 11, 2024 15:21
@mvaligursky mvaligursky merged commit 1f083b6 into main Jul 11, 2024
8 checks passed
@mvaligursky mvaligursky deleted the mv-remove-ambient-tint branch July 11, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants