static public VFXExpression FixedRandom(VFXExpression hash, VFXSeedMode mode)
        {
            VFXExpression seed = new VFXExpressionBitwiseXor(hash, VFXBuiltInExpression.SystemSeed);

            if (mode != VFXSeedMode.PerComponent)
            {
                seed = new VFXExpressionBitwiseXor(new VFXAttributeExpression(mode == VFXSeedMode.PerParticle ? VFXAttribute.ParticleId : VFXAttribute.StripIndex), seed);
            }
            return(new VFXExpressionFixedRandom(seed));
        }
Exemple #2
0
        static public VFXExpression FixedRandom(VFXExpression hash, bool perElement)
        {
            VFXExpression seed = new VFXExpressionBitwiseXor(hash, VFXBuiltInExpression.SystemSeed);

            if (perElement)
            {
                seed = new VFXExpressionBitwiseXor(new VFXAttributeExpression(VFXAttribute.ParticleId), seed);
            }
            return(new VFXExpressionFixedRandom(seed));
        }
        static public VFXExpression FixedRandom(VFXExpression hash, bool perElement)
        {
            VFXExpression seed = new VFXExpressionBitwiseXor(hash, VFXBuiltInExpression.SystemSeed);

            return(new VFXExpressionFixedRandom(seed, perElement));
        }