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

Add EffectAsset::prng_seed #427

Merged
merged 3 commits into from
Mar 8, 2025
Merged

Add EffectAsset::prng_seed #427

merged 3 commits into from
Mar 8, 2025

Conversation

djeedai
Copy link
Owner

@djeedai djeedai commented Mar 8, 2025

Add a new field to the effect asset, which determines the seed for the GPU side PRNG used in shader expressions. This value defaults to zero, making consecutive runs deterministic. This both gives better artistic control (what executes at runtime is what was authored), and helps with debugging by making repros consistent.

To restore the old behavior, assign a random value to the seed when creating the effect asset, .e.g prng_seed = rand::random::<u32>().

Add a new field to the effect asset, which determines the seed for the
GPU side PRNG used in shader expressions. This value defaults to zero,
making consecutive runs deterministic. This both gives better artistic
control (what executes at runtime is what was authored), and helps with
debugging by making repros consistent.

To restore the old behavior, assign a random value to the seed when
creating the effect asset, _.e.g_ `prng_seed = rand::random::<u32>()`.
@djeedai djeedai added C - breaking change A breaking API or behavior change A - components Change related to an ECS component A - expressions Change related to the Expression API labels Mar 8, 2025
@djeedai djeedai merged commit 3c7a6d0 into main Mar 8, 2025
15 checks passed
@djeedai djeedai deleted the u/no-rand branch March 8, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - components Change related to an ECS component A - expressions Change related to the Expression API C - breaking change A breaking API or behavior change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant