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

Update to Magnum with a magic shader flag & Python bindings for scene export #2032

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

mosra
Copy link
Collaborator

@mosra mosra commented Mar 15, 2023

Motivation and Context

What's new:

  • Utility::Arguments now support both the --option value and --option=value form for better consistency with usual Unix tools
  • GL::Renderer::setDepthRange() and related additions to the GL library for enabling better-precision and reverse depth buffers
  • MeshTools::generateIndices(), which converts strips/fans/loops to standalone primitives, now works also with already-indexed meshes for more convenience
  • Shaders::PhongGL::Configuration::setLightCount() now decouples total passed light count from how many lights to use per draw for more optimal codegen with light culling enabled
  • New Flag::ShaderStorageBuffers (i.e., the ✨ magic flag ✨ that didn't make it into Update to Magnum with new MaterialTools and improved glTF import/export #2015) in all builtin shaders, which -- compared to uniform buffers -- allows them to have the uniform arrays of unbounded size. This makes it possible to easily render huge Floorplanner scenes consisting of tens of thousands of materials and thousands of draw calls. The tradeoff is that it may be slower than uniform buffers and doesn't work on macGL (which is stuck on GL4.1) and WebGL, meaning it's still worth to reduce the material / draw count in the datasets. On the other hand this feature translates directly to Vulkan, Metal and WebGPU so it isn't a work wasted on something GL-specific.
  • And more! 🤫

Python bindings have the following new APIs exposed. This is the bulk I showcased last Thursday with the density-aware decimation script:

On the Python front I'll be exposing texture- and material-related properties next, to allow density-aware image resizing similar to meshes.

How Has This Been Tested

My CIs are 🟢

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 15, 2023
Copy link
Contributor

@jturner65 jturner65 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this upgrade include the changes you made for the mesh optimizer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Which ones do you mean specifically? The full API is exposed but the meshoptimizer submodule isn't added and the related plugins are not enabled either as I felt those would be a dead weight for 99% users.

Related post on Slack -- let's discuss there.

Copy link
Contributor

@0mdc 0mdc left a comment

Choose a reason for hiding this comment

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

Thank you!

@mosra mosra merged commit 2e4b059 into main Mar 16, 2023
@mosra mosra deleted the update-magnum22 branch March 16, 2023 15:48
@ykarmesh ykarmesh restored the update-magnum22 branch March 24, 2023 16:59
@ykarmesh ykarmesh deleted the update-magnum22 branch March 24, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants