-
Notifications
You must be signed in to change notification settings - Fork 53
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 material switching for objects using shaders (ogre2) #533
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-rendering6 #533 +/- ##
==================================================
- Coverage 54.38% 54.37% -0.01%
==================================================
Files 198 198
Lines 20087 20096 +9
==================================================
+ Hits 10925 10928 +3
- Misses 9162 9168 +6
Continue to review full report at Codecov.
|
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.
can we add a test ?
Signed-off-by: Ian Chen <[email protected]>
…ing into shader_fixes
Signed-off-by: Ian Chen <[email protected]>
yep, added test in 33dd4c4 |
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
hmm test is failing on github bionic build but pass on focal and other jenkins machines. Not sure if it's a bionic software rendering or mesa driver issue or something else. Added logic to disable test on github action. f82a0ac |
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.
some minor style issues
test/integration/camera.cc
Outdated
if (_renderEngine == "optix") | ||
{ | ||
igndbg << "Custom shaders are not supported yet in rendering engine: " | ||
<< _renderEngine << std::endl; |
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.
<< _renderEngine << std::endl; | |
<< _renderEngine << std::endl; |
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.
test/integration/camera.cc
Outdated
igndbg << "Engine '" << _renderEngine | ||
<< "' is not supported" << std::endl; |
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.
igndbg << "Engine '" << _renderEngine | |
<< "' is not supported" << std::endl; | |
igndbg << "Engine '" << _renderEngine | |
<< "' is not supported" << std::endl; |
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.
Signed-off-by: Ian Chen <[email protected]>
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1 |
🦟 Bug fix
Related PR: gazebosim/gz-sim#1275
Summary
Mouse picking works by assigning a unique material to an object. When a user clicks on a object, we switch out its material to a unique one to identify the clicked object. There is bug that when switching objects that use custom shader materials. Added an extra check and logic make sure we restore the correct material (low level shader material).
Also fixed a bug that causes ign-rendering to crash when a long shader name is given.
Test this with ign-gazebo using gazebosim/gz-sim#1275. Launch the
shader_param.sdf
world and hover the mouse over the 3D render window. Without these changes, the shader will stop working and the sphere will turn black.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.