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 use of srgb format for texture maps (from glb meshes) #931

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 4, 2023

🦟 Bug fix

Summary

Continuing efforts from gazebosim/gz-common#532 for fixing rendering of glb meshes, this PR fixes the texture formats for textures coming from glb meshes. Previous behavior assumes all PBR textures are in sRGB format as the result the meshes are rendered darker than it should be. Only certain textures, (e.g. diffuse, emissive, and lightmap textures) should be in sRGB.

You can test with this water_bottle.sdf world.

Before this change:

dark_water_bottle

After:

water_bottle_srgb_fix

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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.

@github-actions github-actions bot added the 🌱 garden Ignition Garden label Oct 4, 2023
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Merging #931 (868f929) into gz-rendering7 (93841e1) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 868f929 differs from pull request most recent head 2f99c59. Consider uploading reports for the commit 2f99c59 to get more accurate results

@@                Coverage Diff                @@
##           gz-rendering7     #931      +/-   ##
=================================================
+ Coverage          77.22%   77.23%   +0.01%     
=================================================
  Files                170      170              
  Lines              14721    14724       +3     
=================================================
+ Hits               11368    11372       +4     
+ Misses              3353     3352       -1     
Files Coverage Δ
ogre2/src/Ogre2Material.cc 76.64% <100.00%> (+0.10%) ⬆️

... and 1 file with indirect coverage changes

@iche033 iche033 merged commit 5892355 into gz-rendering7 Oct 4, 2023
12 of 13 checks passed
@iche033 iche033 deleted the tex_data_srgb branch October 4, 2023 23:47
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.

2 participants