Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public override void Bind()
        {
            set.BindPrimaryForm("_VertBuffer", Hair);
            set.BindForm("_BaseBuffer", Base);

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

            constraint.BindInt("_Pass", 0);
            constraint.BindPrimaryForm("_VertBuffer", Hair);
            constraint.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);

            resolve.BindPrimaryForm("_VertBuffer", Hair);
            resolve.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);
        }
Exemplo n.º 3
0
 public override void Bind()
 {
     forces.BindPrimaryForm("_VertBuffer", verts);
     forces.BindInt("_NumVertsX", () => verts.numVertsX);
     forces.BindInt("_NumVertsY", () => verts.numVertsY);
     constraint.BindPrimaryForm("_ConnectionBuffer", connections);
     constraint.BindForm("_VertBuffer", verts);
     constraint.BindInt("_NumVertsX", () => verts.numVertsX);
     constraint.BindInt("_NumVertsY", () => verts.numVertsY);
     normalize.BindPrimaryForm("_VertBuffer", verts);
 }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
        public override void Bind()
        {
            life.BindForm("_HeadBuffer", head);

            TrailParticles tp = (TrailParticles)form;

            life.BindInt("_ParticlesPerTrail", () => tp.particlesPerTrail);

            transport.BindPrimaryForm("_ParticleBuffer", head);
            transport.BindForm("_VertBuffer", form);
            transport.BindInt("_NumVertsPerHair", () => tp.particlesPerTrail);
            data.BindCameraData(transport);
        }