-
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
Respect vertex shader from low level materials in sensor passes (#544) #578
Conversation
…bosim#544) Fixes gazebosim#544 Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #578 +/- ##
==========================================
- Coverage 53.12% 53.08% -0.04%
==========================================
Files 214 214
Lines 21229 21299 +70
==========================================
+ Hits 11278 11307 +29
- Misses 9951 9992 +41
Continue to review full report at Codecov.
|
I am testing this with this integration test ( I'm getting a segfault pointing to this line in |
Signed-off-by: Matias N. Goldberg <[email protected]>
Thanks for the test! I accidentally removed two lines I shouldn't have, thus Thermal camera wasn't restoring the original material once it was done. The code failed because the last camera was trying to look for "material_name_solid_solid", since Thermal didn't restore ""material_name_solid" ->"material_name" |
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.
nice, confirmed that it works now!
@iche033 and @darksylinc, unfortunately this PR breaks a number of the examples when using Metal. They include
It also prevents the gazebo GUI from running on macOS (i.e. The Ogre log message is a similar in all cases: Shader _ign_scene::Material(65519)_solid_fs compiled successfully.
WARNING: Pixel Shader '_ign_scene::Material(65519)_solid_fs' without shader_reflection_pair_hint. If this is intentional, use build_parameters_from_reflection false to hide this warning. |
The code definitely handles the reflection hint, but perhaps it doesn't run or runs too late? |
It may be running too late. The error is emitted here: before the reflection_pair_hint is set. I'll see if I can either move the reflection hint earlier or defer setting the constant |
Ahhh!! Of course! That call can only be done in |
Yep - just verified for the mesh_viewer example. Moved that block to Ok - looks good to me with that change (I've been messing about with a local copy of the wave shader which is why that looks different) |
- Move setting params to after the vertex shader has been created and the shader reflection pair hint set. Signed-off-by: Rhys Mainwaring <[email protected]>
- Move setting params to after the vertex shader has been created and the shader reflection pair hint set. Signed-off-by: Rhys Mainwaring <[email protected]>
- Move setting params to after the vertex shader has been created and the shader reflection pair hint set. Signed-off-by: Rhys Mainwaring <[email protected]>
🦟 Bug fix
Fixes #544
Summary
It implements the first option (clone the material with same VS but different PS).
However I could NOT test this PR because I had no test nor sample to test it.
That is the reason this PR is marked as draft. I would appreciate a way to play with this (i.e. a low level material entity being drawn in all sensors).
The lack of tests is tracked by #543
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.