-
Notifications
You must be signed in to change notification settings - Fork 51
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
Don't crash if directly set low level materials are used in sensors #593
Conversation
Signed-off-by: Matias N. Goldberg <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.
Please stand by before merging; I have one more fix incoming! |
Signed-off-by: Matias N. Goldberg <[email protected]>
OK Done! Just to explain this question from @chapulina
The oldest code (before my PR that broke sensors) would just override any custom material with a standard one that does what's necessary by the sensor (e.g. for thermal, it draws the specified temperature on screen). When @iche033 introduced custom (user provided) shaders, there was the problem that advanced vertex shaders could not be reproduced, thus custom geometry deformation could be handled by the standard material; and thus the sensor would see the right temperature but the wrong shape. I fixed it by adding a PR which glues the custom vertex shader with a standard pixel shader. BUT, that only works with this new interface @iche033 added a while ago. When it comes to low level materials internally defined (usually in material scripts) by Ignition (not the user defined ones); this gluing doesn't happen. It doesn't need to happen anyway because fortunately none of our VS are advanced enough (except for the point material, which can be manually workarounded). |
Codecov Report
@@ Coverage Diff @@
## main #593 +/- ##
=======================================
Coverage 53.54% 53.55%
=======================================
Files 214 214
Lines 21304 21319 +15
=======================================
+ Hits 11408 11417 +9
- Misses 9896 9902 +6
Continue to review full report at Codecov.
|
latest changes look good to me. @chapulina can you verify this works for you? |
Yup, works for me, thanks for the proper fix! |
Signed-off-by: Matias N. Goldberg [email protected]
🦟 Bug fix
No ticket was issued for this problem
This PR supersedes #586
Summary
The problem has been described in #586
This PR replaces it as it is applied to more sensors and comments explain why there can be nullptrs.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.