public override void Create() { Lifes.Add(force); Lifes.Add(constrain); Forms.Add(verts); force._Create(); constrain._Create(); verts._Create(); force.BindPrimaryForm("_VertBuffer", verts); force.BindForm("_SkeletonBuffer", skeleton); force.BindAttribute("_NumVertsPerHair", "numVertsPerHair", skeleton); force.BindAttribute("_NumHairs", "numHairs", skeleton); force.BindAttribute("_VertsPerVert", "vertsPerVert", verts); constrain.BindPrimaryForm("_VertBuffer", verts); constrain.BindForm("_SkeletonBuffer", skeleton); constrain.BindAttribute("_NumVertsPerHair", "numVertsPerHair", skeleton); constrain.BindAttribute("_NumHairs", "numHairs", skeleton); constrain.BindAttribute("_VertsPerVert", "vertsPerVert", verts); constrain.BindAttribute("_Length", "armLength", this); }
// Use this for initialization public override void Create() { Lifes.Add(place); Lifes.Add(bodyTransfer); Forms.Add(skin.verts); Forms.Add(verts); Forms.Add(bodyVerts); Forms.Add(bodyTris); verts._Create(skin.verts); bodyVerts._Create(verts); bodyTris._Create(bodyVerts); place._Create(); bodyTransfer._Create(); place.BindPrimaryForm("_VertBuffer", verts); place.BindForm("_SkinnedBuffer", skin.verts); place.BindAttribute("_Whirlwind", "whirlwindState", this); place.BindAttribute("_WhirlwindSpeed", "whirlwindSpeed", this); bodyTransfer.BindAttribute("_CameraUp", "cameraUp", this); bodyTransfer.BindAttribute("_CameraLeft", "cameraLeft", this); bodyTransfer.BindAttribute("_Radius", "radius", this); bodyTransfer.BindPrimaryForm("_VertBuffer", bodyVerts); bodyTransfer.BindForm("_ParticleBuffer", verts); }
public override void Create() { /* * All of this info should be visualizable! */ Lifes.Add(FlowerTransfer); Forms.Add(FlowerVerts); Forms.Add(FlowerTriangles); FlowerTransfer._Create(); FlowerVerts._Create(); FlowerTriangles._Create(); body._Create(); FlowerTransfer.BindPrimaryForm("_VertBuffer", FlowerVerts); FlowerTransfer.BindForm("_HairBuffer", Hair); FlowerTransfer.BindAttribute("_NumVertsPerHair", "numVertsPerHair", Hair); FlowerTransfer.BindAttribute("_Size", "size", this); }
public override void Create() { Lifes.Add(smooth); Forms.Add(smoothed); smooth._Create(); smoothed._Create(); smooth.BindPrimaryForm("_VertBuffer", smoothed); smooth.BindForm("_SkeletonBuffer", hair); smooth.BindAttribute("_NumVertsPerHair", "numVertsPerHair", hair); smooth.BindAttribute("_NumHairs", "numHairs", hair); smooth.BindAttribute("_SmoothNumVertsPerHair", "numVertsPerHair", smoothed); }
// Use this for initialization public override void Create() { Lifes.Add(skin); Forms.Add(verts); Forms.Add(tris); Forms.Add(bones); skin._Create(); verts._Create(verts); tris._Create(tris); bones._Create(bones); skin.BindPrimaryForm("_VertBuffer", verts); skin.BindForm("_BoneBuffer", bones); }
// Use this for initialization public override void Create() { Lifes.Add(intersect); Lifes.Add(place); Lifes.Add(bodyTransfer); Forms.Add(particles); Forms.Add(bodyVerts); Forms.Add(bodyTris); mesh = skin.gameObject.GetComponent <MeshFilter>(); particles._Create(skin.verts); bodyVerts._Create(particles); bodyTris._Create(bodyVerts); place._Create(); intersect._Create(); bodyTransfer._Create(); place.BindPrimaryForm("_VertBuffer", particles); place.BindForm("_SkinnedBuffer", skin.verts); place.BindAttribute("_Transform", "transformFloats", this); intersect.BindForm("_ParticleBuffer", particles); intersect.BindForm("_SkinnedVertBuffer", skin.verts); intersect.BindPrimaryForm("_SkinnedTriBuffer", skin.tris); intersect.BindAttribute("_RO", "RayOrigin", touch); intersect.BindAttribute("_RD", "RayDirection", touch); intersect.BindAttribute("_Transform", "transformFloats", this); bodyTransfer.BindAttribute("_CameraUp", "cameraUp", this); bodyTransfer.BindAttribute("_CameraLeft", "cameraLeft", this); bodyTransfer.BindAttribute("_Radius", "radius", this); bodyTransfer.BindPrimaryForm("_VertBuffer", bodyVerts); bodyTransfer.BindForm("_ParticleBuffer", particles); }
public override void Create() { transformArray = new float[16]; /* * All of this info should be visualizable! */ Lifes.Add(SetHairPosition); Lifes.Add(HairCollision); Lifes.Add(HairConstraint0); Lifes.Add(HairConstraint1); Lifes.Add(HairTransfer); Forms.Add(Base); Forms.Add(Hair); Forms.Add(TubeVerts); Forms.Add(TubeTriangles); SetHairPosition._Create(); HairCollision._Create(); HairConstraint0._Create(); HairConstraint1._Create(); Base._Create(); Hair._Create(); HairTransfer._Create(); TubeVerts._Create(); TubeTriangles._Create(); SetHairPosition.BindPrimaryForm("_VertBuffer", Hair); SetHairPosition.BindForm("_BaseBuffer", Base); HairCollision.BindPrimaryForm("_VertBuffer", Hair); HairCollision.BindForm("_BaseBuffer", Base); HairConstraint0.BindInt("_Pass", 0); HairConstraint0.BindPrimaryForm("_VertBuffer", Hair); HairConstraint1.BindInt("_Pass", 1); HairConstraint1.BindPrimaryForm("_VertBuffer", Hair); HairTransfer.BindPrimaryForm("_VertBuffer", TubeVerts); HairTransfer.BindForm("_HairBuffer", Hair); HairTransfer.BindAttribute("_TubeWidth", "width", TubeVerts); HairTransfer.BindAttribute("_TubeLength", "length", TubeVerts); HairTransfer.BindAttribute("_NumVertsPerHair", "numVertsPerHair", Hair); HairTransfer.BindAttribute("_TubeRadius", "tubeRadius", this); SetHairPosition.BindAttribute("_HairLength", "length", Hair); SetHairPosition.BindAttribute("_NumVertsPerHair", "numVertsPerHair", Hair); // Don't need to bind for all of them ( constraints ) because same shader HairCollision.BindAttribute("_HairLength", "length", Hair); HairCollision.BindAttribute("_NumVertsPerHair", "numVertsPerHair", Hair); HairCollision.BindAttribute("transform", "transformArray", this); }