Skip to content

Make MAX_DIRECTIONAL_LIGHTS a runtime value #8992

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

Open
cart opened this issue Jun 29, 2023 · 2 comments
Open

Make MAX_DIRECTIONAL_LIGHTS a runtime value #8992

cart opened this issue Jun 29, 2023 · 2 comments
Labels
A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@cart
Copy link
Member

cart commented Jun 29, 2023

What problem does this solve or what need does it fill?

Currently MAX_DIRECTIONAL_LIGHTS is const, which prevents us from setting it to platform-specific (detected at runtime) values. For example, we need to set it to 1 for Adreno GPUs on WebGL. Currently, we are hard coding the value to 1 on WebGL for all GPUs, which is unnecessary.

What solution would you like?

Make it a dynamic value set and read at runtime.

See #8505 for more information.

@cart cart added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen labels Jun 29, 2023
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed C-Feature A new feature, making something new possible labels Jun 29, 2023
@dakom
Copy link

dakom commented Dec 25, 2024

I created a repo with a live Github Pages demo to show the problem, in case this helps: https://github.com/dakom/bevy-issue-8992

It has 2 directional lights, a PBR model, and fog - and hits a fork that increases MAX_DIRECTIONAL_LIGHTS to 10 for webgl

@BenjaminBrienen BenjaminBrienen added S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Trivial Nice and easy! A great choice to get started with Bevy and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 25, 2024
@skimmedsquare
Copy link
Contributor

Just a note: been poking around the repo for some issues to get started with, but based on the below comment from #8508 ...

I briefly poked around with this. Making it non-const is non-trivial and will require a bit of elbow grease.

This might be better tagged as something other than D-Trivial

@BenjaminBrienen BenjaminBrienen added D-Straightforward Simple bug fixes and API improvements, docs, test and examples and removed D-Trivial Nice and easy! A great choice to get started with Bevy labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

No branches or pull requests

5 participants