Пример #1
0
        public override void Bind()
        {
            set.BindPrimaryForm("_VertBuffer", Hair);
            set.BindForm("_BaseBuffer", Base);

            collision.BindPrimaryForm("_VertBuffer", Hair);
            collision.BindForm("_BaseBuffer", Base);

            constraint0.BindInt("_Pass", 0);
            constraint0.BindFloat("_HairLength", () => Hair.length);
            constraint0.BindPrimaryForm("_VertBuffer", Hair);
            constraint0.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);

            constraint1.BindInt("_Pass", 1);
            constraint1.BindFloat("_HairLength", () => Hair.length);
            constraint1.BindPrimaryForm("_VertBuffer", Hair);
            constraint1.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);

            set.BindFloat("_HairLength", () => Hair.length);
            set.BindFloat("_HairVariance", () => Hair.variance);
            set.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);

            // Don't need to bind for all of them ( constraints ) because same shader
            collision.BindFloat("_HairLength", () => Hair.length);
            collision.BindFloat("_HairVariance", () => Hair.variance);
            collision.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);
            collision.BindFloats("_Transform", () => this.transformArray);

            data.BindCameraData(collision);
        }
Пример #2
0
        public override void Bind()
        {
            // Binding all the neccesary values for our gooey body
            // Remember that we can also use 'binders' in conjunction
            // to do the binding for us
            gooeyTransfer.BindPrimaryForm("_VertBuffer", gooeyVerts);
            gooeyTransfer.BindForm("_SkeletonBuffer", baseVerts);

            gooeyTransfer.BindFloat("_Dampening", () => dampening);
            gooeyTransfer.BindFloat("_DisformerForce", () => disformForce);
            gooeyTransfer.BindFloat("_Force", () => force);



            // Binding all the neccesary values for out particle simulation
            anchorTransfer.BindPrimaryForm("_ParticleBuffer", particles);
            anchorTransfer.BindForm("_VertBuffer", gooeyVerts);

            anchorTransfer.BindFloat("_OutAmount", () => particlesOutAmount);
            anchorTransfer.BindFloat("_Force", () => particlesFollowForce);
            anchorTransfer.BindFloat("_Dampening", () => particlesFollowDampening);


            //Binding all values for the particle transfer ( in order to make quads! )
            particleBodyTransfer.BindPrimaryForm("_VertBuffer", particleTransferVerts);
            particleBodyTransfer.BindForm("_SkeletonBuffer", particles);

            particleBodyTransfer.BindFloat("_Radius", () => particleRadius);
            data.BindCameraData(particleBodyTransfer);
        }
Пример #3
0
        public override void Bind()
        {
            //  print("hmmmss");
            transfer.BindPrimaryForm("_VertBuffer", verts);
            transfer.BindForm("_SkeletonBuffer", skeleton);


            TrailRibbonVerts v = (TrailRibbonVerts)verts;

            transfer.BindInt("_RibbonLength", () => v.length);

            TrailParticles s = (TrailParticles)skeleton;

            transfer.BindInt("_NumVertsPerHair", () => s.particlesPerTrail);

            //parallel.BindPrimaryForm("_ParticleBuffer" , particles);
            //parallel.BindForm("_VertBuffer" , verts );
//
            //parallel.BindInt( "_RibbonLength"     ,   () => v.length  );
            //parallel.BindInt( "_NumVertsPerHair"  ,   () => v.length  );

            data.BindCameraData(transfer);

            //parallel.BindFloat( "_Radius" ,  () => this.radius );
            transfer.BindFloat("_Radius", () => this.radius);
        }
Пример #4
0
        public override void Bind()
        {
            life.BindInt("_CurrentStep", () => currentStep);
            life.BindFloat("_PercentageDone", () => percentageDone);

            life.BindMatrix("_Transform", () => transform.localToWorldMatrix);
            life.BindMatrix("_InverseTransform", () => transform.worldToLocalMatrix);

            life.BindForm("_VertBuffer", mesh.verts);
            life.BindForm("_TriBuffer", mesh.triangles);

            life.BindVector3("_Center", () => ((Form3D)form).center);
            life.BindVector3("_Dimensions", () => ((Form3D)form).dimensions);
            life.BindVector3("_Extents", () => ((Form3D)form).extents);


            finalLife.BindPrimaryForm("_VolumeBuffer", form);
            finalLife.BindInt("_CurrentStep", () => currentStep);
            finalLife.BindFloat("_PercentageDone", () => percentageDone);

            finalLife.BindMatrix("_Transform", () => transform.localToWorldMatrix);
            finalLife.BindMatrix("_InverseTransform", () => transform.worldToLocalMatrix);


            finalLife.BindVector3("_Center", () => ((Form3D)form).center);
            finalLife.BindVector3("_Dimensions", () => ((Form3D)form).dimensions);
            finalLife.BindVector3("_Extents", () => ((Form3D)form).extents);
        }
Пример #5
0
        public override void _Bind()
        {
            transfer.BindPrimaryForm("_VertBuffer", verts);
            transfer.BindForm("_SkeletonBuffer", skeleton);

            data.BindCameraData(transfer);

            transfer.BindFloat("_Radius", () => this.radius);
            transfer.BindMatrix("_Transform", () => transform.localToWorldMatrix);

            Bind();
        }
Пример #6
0
        public override void _Bind()
        {
            transfer.BindPrimaryForm("_VertBuffer", verts);
            transfer.BindForm("_SkeletonBuffer", skeleton);

            data.BindCameraData(transfer);

            transfer.BindFloat("_Radius", () => this.radius);
            transfer.BindFloats("_TransformBase", () => this.transformArray);

            Bind();
        }
Пример #7
0
        public override void Bind()
        {
            life.BindPrimaryForm("_ParticleBuffer", particles);
            life.BindForm("_VertBuffer", verts);

            life.BindVector3("_Velocity", () => this.velocity);

            life.BindForm("_TransformBuffer", transformBuffer);

            life.BindFloat("_CurlStrength", () => _CurlStrength);
            life.BindFloat("_CurlSize", () => _CurlSize);
            life.BindFloat("_CurlSpeed", () => _CurlSpeed);
            life.BindFloat("_ReturnStrength", () => _ReturnStrength);
            life.BindFloat("_Dampening", () => _Dampening);


            triLocation.BindPrimaryForm("_ParticleBuffer", particles);
            triLocation.BindForm("_VertBuffer", verts);

            resolve.BindPrimaryForm("_ParticleBuffer", particles);
            resolve.BindFloat("_ResolveReduceAmount", () => _ResolveReduceAmount);
        }
Пример #8
0
        public override void Bind()
        {
            set.BindPrimaryForm("_VertBuffer", Hair);
            set.BindForm("_BaseBuffer", Base);

            collision.BindPrimaryForm("_VertBuffer", Hair);
            collision.BindForm("_BaseBuffer", Base);

            constraint.BindFloat("_HairLength", () => Hair.length);
            constraint.BindPrimaryForm("_VertBuffer", Hair);
            constraint.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);

            set.BindFloat("_HairLength", () => Hair.length);
            set.BindFloat("_HairVariance", () => Hair.variance);
            set.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);

            // Don't need to bind for all of them ( constraints ) because same shader
            collision.BindFloat("_HairLength", () => Hair.length);
            collision.BindFloat("_HairVariance", () => Hair.variance);
            collision.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);
            collision.BindMatrix("_Transform", () => transform.localToWorldMatrix);

            data.BindCameraData(collision);
        }