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

Examples Improvements Tracking Issue #4783

Open
1 of 24 tasks
cwfitzgerald opened this issue Nov 26, 2023 · 1 comment
Open
1 of 24 tasks

Examples Improvements Tracking Issue #4783

cwfitzgerald opened this issue Nov 26, 2023 · 1 comment
Labels
area: ecosystem Help the connected projects grow and prosper type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Nov 26, 2023

As of 2023-11 the examples have multiple issues that don't make them work very well as examples and demos of how to use the API. This tracking issue works towards improving the examples.

Too Test-ey

Previously, before we had the wicked test suite we have today, we often used examples as a dumping ground for new features, so they can get tested. We should remove the extra features from the various examples and move tests for those features into proper tests.

  • cube uses PolygonMode::Line
  • hello_compute shouldn't have tests. These should be tests in the test suite.
  • hello_synchronization shouldn't have tests either.
  • mipmap uses timestamp queries and pipeline statistics queries.
  • shadow uses depth-clip-control for actually no reason.
  • srgb_blend uses polygon-mode-line also for no reason.
  • texture-arrays is basically just a test.

Not Flashy Enough

A lot of our examples are particular flashy. These you could classify as "demos" more than examples, but they're important, particularly on the web to show of "hey look at this project is so cool"

  • water
    • Make RODS optional so that it can run on WebGL2. This can introduce an extra copy, which shows the benefit of RODS
    • Expand the land shown
    • Add a skybox
    • Maybe a little ship bobbing up and down.
  • Port https://github.com/gfx-rs/gfx-ocean to wgpu
  • Other ideas?

WebGL2

  • bunnymark renders nothing on WebGL2
  • skybox doesn't work on M1 + Firefox Fixes for Skybox and All Examples #4780
  • water is our most flashy example, but requires RODS, which WebGL2 doesn't support.
  • A lot of the non-framework examples don't run on WebGL2, just as they never make a canvas. We should add a helper function which makes a hidden canvas and creates a surface on the Web.

Non-Framework Examples

We have multiple examples that don't use the framework and communicate the results back to the user in special ways, either web-specific or through the console.

The Webpage for the examples should have a standard way of communicating this information, and the examples should have helper functions that make it easy to show on the webpage or in the console.

Other Issues

  • bunnymark has upside-down logo.
  • bunnymark's screenshot looks terrible and includes special code in the example itself for testing and generating that screenshot. We should move any special casing to the test.
  • hello-triangle should use a standard array instead of a bitmasking situation to store its vertices.
  • uniform-values should use the standard framework, and how to integrate async into that framework.
  • Examples don't take into account delta-t at all, just tick once per frame.
  • We need to delay creating a window until after we receive Resumed in the event loop. We should use the canvas in the webpage to make a surface on the web before we make a winit window.
@cwfitzgerald cwfitzgerald added type: enhancement New feature or request area: ecosystem Help the connected projects grow and prosper labels Nov 26, 2023
@ErichDonGubler

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ecosystem Help the connected projects grow and prosper type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants