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

Implement base instance in shaders on GL #4722

Closed

Conversation

cwfitzgerald
Copy link
Member

@cwfitzgerald cwfitzgerald commented Nov 19, 2023

Connections

Closes #4276

Description

This adds the necessary logic so that @builtin(instance_index) works correctly wrt the base instance in direct draw calls.

We currently don't even issue draw calls using the BaseInstance draw function of gl (we rebind the instance rate buffers), so indirect will be fun to pull off at a future time.

Testing

Covered by testing

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@cwfitzgerald cwfitzgerald marked this pull request as ready for review November 19, 2023 00:58
@cwfitzgerald cwfitzgerald requested review from a team as code owners November 19, 2023 00:58
@applesm18

This comment was marked as off-topic.

@cwfitzgerald
Copy link
Member Author

Closing in favor of #4723.

I tried to keep them separate, but the fixes needed got way too intertwined.

@cwfitzgerald cwfitzgerald deleted the implement-base-instance branch November 20, 2023 08:12
@applesm18
Copy link

May I join in your work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

draw_instanced_offset fails on GL
2 participants