-
Notifications
You must be signed in to change notification settings - Fork 81
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
Something wrong with custom property values in expressions used in modifiers (and maybe issue with graph::Value size too?) #310
Comments
Thanks @liam-b for the report and repro. I think there's two things here: The property bug is I think a regression I saw recently. Try adding an The value size thing, I think it works as expected. When you query |
Oh wait no |
By the way to spawn everything in one place just use |
The `MatrixValue` where C=3 require padding to 16 bytes, as per the WGSL specification. The padding was missing, leading to the wrong value being written for _e.g._ properties. Fixes #310
The `MatrixValue` where C=3 require padding to 16 bytes, as per the WGSL specification. The padding was missing, leading to the wrong value being written for _e.g._ properties. Fixes #310
The `MatrixValue` where C=3 require padding to 16 bytes, as per the WGSL specification. The padding was missing, leading to the wrong value being written for _e.g._ properties. Fixes #310
Reopening to wait for confirmation about |
Yep, you seem to be right about commands.spawn((
ParticleEffectBundle {
effect: ParticleEffect::new(effects.add(effect)),
..default()
},
EffectProperties::default(),
));
Which looks like it comes back to the padding issue! (which is still in 0.10.0, of course) If I change |
Yes the padding issue was probably there from the start. I'll have a look at the |
Fixed by #312 |
Crate versions
bevy
version: 0.13.1bevy_hanabi
version: 0.10.0Describe the bug
The value I'm setting for a custom property in an effect asset doesn't seem to be working properly. In the snippet below, I'm setting up a
SetAttributeModifier
that just writes the result of a mul involving a property to theAXIS_X
attribute but something goes wrong and nothing is being displayed on the screen.If you comment the
value: module.mul(prop, x_vec)
line out and use the one below instead, everything works fine and you can see the particles.After poking around a bit I ran into this which makes me think it could be a layout issue? Not totally sure.
Expected behavior
To be able to use a custom property in a modifier expression for an effect asset.
To Reproduce
I made a reproduction repo over here. If you clone it and run
cargo run
andcargo test
you should be able to see what I'm talking about.I would dig a little deeper if I had more time right now and it's possible I'm just misunderstanding how this stuff is meant to work but hopefully someone can help me out. Thanks!
The text was updated successfully, but these errors were encountered: