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

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

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

mosra
Copy link
Collaborator

@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
Copy link
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 on lines 2231 to 2234
if (material.hasTexture())
finalMaterial->textureMatrix = material.textureMatrix();

Copy link
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
Collaborator Author

Choose a reason for hiding this comment

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

😱

Copy link
Collaborator 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!

Copy link
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.

None yet

4 participants