Example #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);
        }
Example #2
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);
 }
Example #3
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);
        }