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

Change shader traits to handle ID enums instead of integers #488

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

thatcomputerguy0101
Copy link
Contributor

This is the breaking change half of #484, where all shader traits pass IDs as their open_enum types (technically structs) instead of as integers. open_enum allows custom IDs to be added by the consuming program, as seen in the firework, logo, and Mandelbrot examples.

I noticed that while changing the original reserved ID comments on Effect that it recommended using the IDs above the internal range instead of below the internal range. I suspect that is due to how materials and effects share the same ID space. If that system is desired to be kept, the documentation of EffectMaterialId will need updated accordingly. Otherwise, it might be good to compress the ID usage of the built-in effects to all be above 0x8000, leaving the lower half of the ID range for public use similar to the other two ID types.

@asny
Copy link
Owner

asny commented Sep 25, 2024

Makes sense 👍 Again, thanks for your contribution 🙏

I noticed that while changing the original reserved ID comments on Effect that it recommended using the IDs above the internal range instead of below the internal range.

Yeah, I think I combined the IDs in a different way at some point.

@asny asny merged commit c475f83 into asny:master Sep 25, 2024
5 checks passed
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.

2 participants