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

[Fix] Fix in lightmapper where a material lightmap would be incorrectly released during baking #7005

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Oct 2, 2024

  • lightmapper was assigning a material specified lightmap to a baked lightmap slot on the mesh instance.
  • when this was followed by lightmap baking, a baked lightmap would be assigned to that spot, and the ref counted original texture would be destroyed
  • I do not see a reason for assignment at all, as we're baking the texture, and so I removed it.
  • avoids crash in Editor when an asset lightmap texture was destroyed .. and any operation on (toggling mimaps) would cause a null access on destroyed texture

@mvaligursky mvaligursky changed the base branch from main to main_v1 October 2, 2024 14:51
@mvaligursky mvaligursky self-assigned this Oct 2, 2024
@mvaligursky mvaligursky added bug area: graphics Graphics related issue labels Oct 2, 2024
@mvaligursky mvaligursky requested a review from a team October 2, 2024 14:55
@mvaligursky mvaligursky merged commit db22161 into main_v1 Oct 2, 2024
1 check passed
@mvaligursky mvaligursky deleted the mv-lightmapper-fix branch October 2, 2024 15:16
mvaligursky added a commit that referenced this pull request Oct 2, 2024
…ly released during baking (#7005)

Co-authored-by: Martin Valigursky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants