-
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
Support using custom shader materials and updating uniform variables (ogre2) #520
Conversation
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-rendering6 #520 +/- ##
==================================================
- Coverage 54.70% 54.48% -0.22%
==================================================
Files 198 198
Lines 20029 20125 +96
==================================================
+ Hits 10956 10966 +10
- Misses 9073 9159 +86
Continue to review full report at Codecov.
|
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[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.
Just 1 small syntax error, but everything looks great!
@@ -64,6 +68,19 @@ void buildScene(ScenePtr _scene) | |||
light0->SetSpecularColor(0.5, 0.5, 0.5); | |||
root->AddChild(light0); | |||
|
|||
t std::string vertexShaderFile; |
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.
t std::string vertexShaderFile; | |
std::string vertexShaderFile; |
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.
oops, fixed. 00d56a1
Signed-off-by: Ian Chen <[email protected]>
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 |
Signed-off-by: Ian Chen [email protected]
Implemented code to supported loading custom shader material and updating their uniform variables.
Extended the
custom_shaders_uniforms
to run with ogre2 render engine. Note I made a slight tweak to the shader code in the demo to make the ogre 1.x and ogre 2.x behavior more consistent. When running withogre2
, the clip space z pos returned bygl_Position.z
is different fromogre
so it was rendering slightly different visual effect.To test:
build and run the custom_shaders_uniforms demo: