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 shaders for other sensors that require material switching (ogre2) #579

Merged
merged 4 commits into from
Mar 14, 2022

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Mar 8, 2022

Signed-off-by: Ian Chen ichen@osrfoundation.org

🦟 Bug fix

Summary

Follow-up to ##575 and these comments

This PR fixes objects with shader material when there is a thermal camera or a segmentation camera in the scene. These sensor all perform material switching during a render update, and the shader materials should now be correctly restored. Also updated test.

Here is a shader_param_sensors.sdf for testing with ign-gazebo. The cameras should produce correct output and the waves and deformable sphere should be render correctly in the GUI and camera and depth sensors.

Note that the thermal and segmentation cameras do not show the animation of waves and is being addressed in #578 (which has a separate fix for this issue targeting ign-rendering7).

ign gazebo -v 4 -r shader_param_sensors.sdf

shader_param_sensors

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Mar 8, 2022
@osrf-triage osrf-triage added this to Inbox in Core development Mar 8, 2022
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #579 (29ee7e0) into ign-rendering6 (bb1b1c2) will decrease coverage by 0.02%.
The diff coverage is 48.71%.

❗ Current head 29ee7e0 differs from pull request most recent head bbb4fe0. Consider uploading reports for the commit bbb4fe0 to get more accurate results

Impacted file tree graph

@@                Coverage Diff                 @@
##           ign-rendering6     #579      +/-   ##
==================================================
- Coverage           54.35%   54.33%   -0.03%     
==================================================
  Files                 198      198              
  Lines               20170    20187      +17     
==================================================
+ Hits                10964    10969       +5     
- Misses               9206     9218      +12     
Impacted Files Coverage Δ
ogre2/src/Ogre2MaterialSwitcher.cc 80.24% <ø> (+0.97%) ⬆️
ogre2/src/Ogre2GpuRays.cc 95.06% <40.00%> (-0.02%) ⬇️
ogre2/src/Ogre2SegmentationMaterialSwitcher.cc 59.23% <47.05%> (-1.99%) ⬇️
ogre2/src/Ogre2ThermalCamera.cc 88.31% <52.94%> (-1.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb1b1c2...bbb4fe0. Read the comment docs.

@mjcarroll mjcarroll moved this from Inbox to In review in Core development Mar 8, 2022
test/integration/camera.cc Outdated Show resolved Hide resolved
test/integration/camera.cc Outdated Show resolved Hide resolved
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 merged commit 2016cd8 into ign-rendering6 Mar 14, 2022
@iche033 iche033 deleted the fix_shader_sensors branch March 14, 2022 23:22
Core development automation moved this from In review to Done Mar 14, 2022
@scpeters scpeters mentioned this pull request Mar 21, 2022
@iche033 iche033 mentioned this pull request Mar 22, 2022
@j-rivero j-rivero removed this from Done in Core development May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants