-
Notifications
You must be signed in to change notification settings - Fork 281
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
Extend ShaderParam system to support loading different shader languages #1335
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
@srmainwaring, I integrated your shaders into the existing models. Hope I didn't mess anything up. |
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo6 #1335 +/- ##
===============================================
+ Coverage 62.91% 62.97% +0.06%
===============================================
Files 299 301 +2
Lines 24151 24208 +57
===============================================
+ Hits 15194 15245 +51
- Misses 8957 8963 +6
Continue to review full report at Codecov.
|
Thanks @iche033! - I'm sure you haven't. I'll give them a test and let you know. Working on porting my more general wave model to Ignition at present - not quite straightforward as it updates the A couple of things I noticed when trying to map shader materials onto a custom mesh:
I'll post an issue with some simplified examples to illustrate. |
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. Not sure if srmainwaring has additional comments.
@srmainwaring oops I missed your comment
yep that sounds good to me.
hmm like the entire ogre material or specific texture? I would have expected ogre to add the texture to its resource path so that it would be available to others but that also depends on the order in which the systems are loaded. |
On this second point it turns out that only one plugin per visual is processed at present, and that is which ever one is declared last is loaded and the preceding ones are ignored. The protobuf Visual message allows for multiple plugins, but the server dispatching the message does not, and there may also be an assumption of one plugin on the GUI side as well. I can work around this for the moment by replicating the ShaderParam plugin logic in my plugin, so it's probably best to submit support for multiple plugins as a feature request. On the first point, addition of normals and tangent attributes, I have some more work to get that working for my example, so again that would best be included as a follow up. |
ok you're right. I've ticketed an issue for this. #1363 |
I'll merge this first. We can address other issues as they come up. |
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-25-fortress-edifice-citadel/1343/1 |
🎉 New feature
Summary
Implemented proposed idea from: #1275 (comment)
The idea is to let users specify different shader files to use. The
<shader>
sdf element now takes an optionallanguage
attribute. On macOS, the system will usemetal
shaders overglsl
if specified.The deformable_sphere and waves models on Fuel have been updated to include metal shaders.
Test it
Remove the
deformable_sphere
andwaves
models in your fuel cache (~/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/models/
) then run ign-gazebo withshaders_param.sdf
world. You should get the same output as the screenshot shown in #1310Checklist
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.