-
Notifications
You must be signed in to change notification settings - Fork 77
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
Have a way to configure colors in a gradient per effect instance #259
Comments
As a suboptimal but simple workaround, did you try with |
Ah, I think that would help, thanks! |
Add some new packing and unpacking expression functions corresponding to the WGSL functions `pack4x8snorm`, `pack4x8unorm`, and their unpack equivalent. Those are very commonly used to convert between low definition `u32` color 0xAABBGGRR and high-definition `vec4<f32>` color. Update the `billboard.rs` example to use those new expressions to store a per-particle color initialized randomly on spawn. Bug: #259
Add some new packing and unpacking expression functions corresponding to the WGSL functions `pack4x8snorm`, `pack4x8unorm`, and their unpack equivalent. Those are very commonly used to convert between low definition `u32` color 0xAABBGGRR and high-definition `vec4<f32>` color. Update the `billboard.rs` example to use those new expressions to store a per-particle color initialized randomly on spawn. Bug: #259
Add some new packing and unpacking expression functions corresponding to the WGSL functions `pack4x8snorm`, `pack4x8unorm`, and their unpack equivalent. Those are very commonly used to convert between low definition `u32` color 0xAABBGGRR and high-definition `vec4<f32>` color. Update the `billboard.rs` example to use those new expressions to store a per-particle color initialized randomly on spawn. Bug: #259
Add some new packing and unpacking expression functions corresponding to the WGSL functions `pack4x8snorm`, `pack4x8unorm`, and their unpack equivalent. Those are very commonly used to convert between low definition `u32` color 0xAABBGGRR and high-definition `vec4<f32>` color. Update the `billboard.rs` example to use those new expressions to store a per-particle color initialized randomly on spawn. Bug: #259
Describe the solution you'd like
I don't have a particular solution in mind, but some potential solutions would be:
vec4<f32>
into a 32-bit integer color (since I can create a gradient manually withvec4<f32>
s)ColorOverLifetimeModifier
to accept a color as a propertyDescribe why you want that solution. Is this related to a problem?
The problem is, I would like to use the same particle effect that involves a gradient, but with arbitrary colors, but that's not possible afaict.
Describe alternatives you've considered
Create many different effect assets, each with different colors hardcoded in. This could work for my use case, but is quite jank.
Additional context
Original Discord discussion
My attempt to work around the issue:
This fails with a wgsl type error between
particle.color
and the expression assigning to it.The text was updated successfully, but these errors were encountered: