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

Extend ogre 1.x custom shaders support #908

Merged
merged 8 commits into from
Oct 5, 2023
Merged

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Sep 15, 2023

🎉 New feature

Related gazebosim/gz-sim#2002 (comment)

Summary

Extended to support features needed to render waves:

  • 2d textures
  • cubemap textures
  • constant variables

Code is ported from the ogre2 implementation

Test it

Build and run the waves example

# ogre 1.x is used when no args are supplied
./waves

Sky is not supported yet in ogre 1.x so you'll only see waves in this demo:

ogre_waves

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • 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@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #908 (2270af2) into gz-rendering7 (5892355) will increase coverage by 0.40%.
The diff coverage is n/a.

❗ Current head 2270af2 differs from pull request most recent head d82b0f2. Consider uploading reports for the commit d82b0f2 to get more accurate results

@@                Coverage Diff                @@
##           gz-rendering7     #908      +/-   ##
=================================================
+ Coverage          77.23%   77.63%   +0.40%     
=================================================
  Files                170      170              
  Lines              14724    14724              
=================================================
+ Hits               11372    11431      +59     
+ Misses              3352     3293      -59     
Files Coverage Δ
ogre2/src/Ogre2Material.cc 85.10% <ø> (+8.45%) ⬆️

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor style issues. is it possible to add a test ?

examples/waves/media/GerstnerWaves_fs.glsl Outdated Show resolved Hide resolved
examples/waves/media/GerstnerWaves_fs.glsl Outdated Show resolved Hide resolved
ogre/src/OgreMaterial.cc Show resolved Hide resolved
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033
Copy link
Contributor Author

iche033 commented Sep 18, 2023

is it possible to add a test ?

yep, will add one

@iche033
Copy link
Contributor Author

iche033 commented Sep 29, 2023

yep, will add one

Added INTEGRATION_waves test that verifies waves can be rendered. Shaders and materials files for the test are taken from the waves demo. 20ca0c7

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment

test/integration/waves.cc Show resolved Hide resolved
@iche033 iche033 merged commit 70e2fe4 into gz-rendering7 Oct 5, 2023
11 of 12 checks passed
@iche033 iche033 deleted the ogre_shaders branch October 5, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants