Skip to content

Properly use texture transformation matrix for flat materials as well.#1688

Merged
aclegg3 merged 1 commit intomainfrom
flat-texturetransform
Mar 9, 2022
Merged

Properly use texture transformation matrix for flat materials as well.#1688
aclegg3 merged 1 commit intomainfrom
flat-texturetransform

Conversation

@mosra
Copy link
Copy Markdown
Contributor

@mosra mosra commented Mar 8, 2022

Motivation and Context

Fixes texture transformation with flat materials. Was done for Phong but not for flat.

Once we port away from these custom structures and use Magnum's MaterialData everywhere, this kind of bugs will become much less likely.

How Has This Been Tested

Trust Me ™️

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

@mosra mosra requested a review from aclegg3 March 8, 2022 19:53
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 8, 2022
@mosra mosra force-pushed the flat-texturetransform branch from 65c3fc9 to 576d0fa Compare March 8, 2022 21:06
Copy link
Copy Markdown
Contributor

@jturner65 jturner65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nit

Comment thread src/esp/assets/ResourceManager.cpp Outdated
Comment on lines +2231 to +2234
if (material.hasTexture())
finalMaterial->textureMatrix = material.textureMatrix();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

braces please, as per Meta C++ style guide :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang Tidy was not bullying me about this, so I thought I'm fine here. Always pushing the limits!

@mosra mosra force-pushed the flat-texturetransform branch from 576d0fa to 198fe92 Compare March 8, 2022 22:07
Copy link
Copy Markdown
Contributor

@aclegg3 aclegg3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@aclegg3 aclegg3 merged commit 8f7384e into main Mar 9, 2022
@aclegg3 aclegg3 deleted the flat-texturetransform branch March 9, 2022 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants