Beispiel #1
0
    // 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);
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    public override void Bind()
    {
        setGlyph.BindPrimaryForm("_TransferBuffer", transferVerts);
        setGlyph.BindForm("_AnchorBuffer", anchor);

        setAnchor.BindPrimaryForm("_VertBuffer", particles);
        setAnchor.BindForm("_AnchorBuffer", anchor);

        setPage.BindPrimaryForm("_VertBuffer", particles);

        simulate.BindPrimaryForm("_VertBuffer", particles);

        transfer.BindPrimaryForm("_TransferBuffer", transferVerts);
        transfer.BindForm("_VertBuffer", particles);
        transfer.BindAttribute("_Radius", "radius", this); //.BindForm("_VertBuffer",particles);
        transfer.BindAttribute("_Scale", "scale", this);   //.BindForm("_VertBuffer",particles);


        simulate.BindAttribute("_Active", "pageActive", story);

        simulate.BindAttribute("_Up", "up", story.ursula);
        simulate.BindAttribute("_CameraForward", "forward", story);
        simulate.BindAttribute("_CameraUp", "up", story);
        simulate.BindAttribute("_PageAlive", "pageAlive", story);
        simulate.BindAttribute("_UrsulaPos", "position", story.ursula);

        simulate.BindAttribute("_Fade", "fade", story);

        simulate.BindAttribute("_RayOrigin", "RayOrigin", touch);
        simulate.BindAttribute("_RayDirection", "RayDirection", touch);
    }
Beispiel #4
0
    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);
    }
Beispiel #5
0
    public override void Bind()
    {
        life.BindPrimaryForm("_VertBuffer", verts);

        life.BindAttribute("_HeightMap", "heightMap", engine);
        life.BindAttribute("_MapSize", "size", engine);
        life.BindAttribute("_MapHeight", "height", engine);
    }
Beispiel #6
0
    public override void Bind()
    {
        smooth.BindPrimaryForm("_VertBuffer", smoothed);
        smooth.BindForm("_SkeletonBuffer", hair);

        smooth.BindAttribute("_NumVertsPerHair", "numVertsPerHair", hair);
        smooth.BindAttribute("_NumHairs", "numHairs", hair);
        smooth.BindAttribute("_SmoothNumVertsPerHair", "numVertsPerHair", smoothed);
    }
Beispiel #7
0
    public override void Bind()
    {
        scan.BindPrimaryForm("_VertBuffer", particles);

        scan.BindAttribute("_ScanPosition", "scannerPos", this);
        scan.BindAttribute("_ScanTime", "scanTime", this);

        engine.BindData(scan);
    }
Beispiel #8
0
    public override void _Bind()
    {
        transfer.BindPrimaryForm("_VertBuffer", verts);
        transfer.BindForm("_SkeletonBuffer", skeleton);

        transfer.BindAttribute("_CameraRight", "right", this);
        transfer.BindAttribute("_CameraUp", "up", this);
        transfer.BindAttribute("_CameraForward", "forward", this);
        Bind();
    }
Beispiel #9
0
    public override void Bind()
    {
        life.BindPrimaryForm("_VectorBuffer", vectors);
        life.BindAttribute("_PaintPosition", "paintPosition", this);
        life.BindAttribute("_PaintDirection", "paintDirection", this);
        life.BindAttribute("_PaintSize", "paintSize", this);
        life.BindAttribute("_PaintOpacity", "paintOpacity", this);
        life.BindAttribute("_NormalOrHeight", "normalOrHeight", this);

        engine.BindData(life);
    }
Beispiel #10
0
    public override void Bind()
    {
        simulate.BindPrimaryForm("_VertBuffer", particles);
        simulate.BindAttribute("_UrsulaPos", "position", story.ursula);

        simulate.BindAttribute("_RayOrigin", "RayOrigin", touch);
        simulate.BindAttribute("_RayDirection", "RayDirection", touch);
        simulate.BindAttribute("_Emit", "emitting", this);
        simulate.BindAttribute("_EmitterPosition", "emitterPos", this);

        transfer.transfer.BindAttribute("_Radius", "radius", this);

        engine.BindData(simulate);
    }
Beispiel #11
0
    // Use this for initialization
    public override void Bind()
    {
        centerPosition = transform.position;

        setPosition.BindAttribute("_StartWidth", "startWidth", this);
        setPosition.BindAttribute("_StartDepth", "startDepth", this);

        simulate.BindAttribute("_UrsulaPos", "position", ursula);
        simulate.BindAttribute("_WandPos", "position", wand);
        simulate.BindAttribute("_RO", "RayOrigin", touch);
        simulate.BindAttribute("_RD", "RayDirection", touch);
        simulate.BindAttribute("_CenterPos1", "centerPosition", this);

        transfer.BindAttribute("_Radius", "radius", this);
    }
Beispiel #12
0
    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);
    }
Beispiel #13
0
    public override void Bind()
    {
        sim.BindPrimaryForm("_VertBuffer", particles);
        sim.BindForm("_BaseBuffer", particles.baseForm);

        sim.BindAttribute("_ParticlesPerParticle", "particlesPerParticle", particles);
    }
Beispiel #14
0
    public override void Bind()
    {
        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);
    }
Beispiel #15
0
 // Use this for initialization
 public override void Bind()
 {
     toBind.BindForm("_SDFBoneBuffer", bones);
     toBind.BindAttribute("_NoiseSpeed", "noiseSpeed", this);
     toBind.BindAttribute("_NoiseForce", "noiseForce", this);
     toBind.BindAttribute("_NoiseSize", "noiseSize", this);
     toBind.BindAttribute("_NormalForce", "normalForce", this);
     toBind.BindAttribute("_Dampening", "dampening", this);
     toBind.BindAttribute("_UpForce", "upForce", this);
     toBind.BindAttribute("_Gravity", "upForce", this);
 }
Beispiel #16
0
    // 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);
    }
Beispiel #17
0
    public override void Bind()
    {
        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.triangles);
        intersect.BindAttribute("_RO", "RayOrigin", touch);
        intersect.BindAttribute("_RD", "RayDirection", touch);
        intersect.BindAttribute("_Transform", "transformFloats", this);
    }
Beispiel #18
0
    public override void Bind()
    {
        simulation.BindPrimaryForm("_VertBuffer", particles);
        simulation.BindAttribute("_Down", "Down", touch);
        simulation.BindAttribute("_CurrentTarget", "currentTargetPosition", story);

        simulation.BindAttribute("_WandPos", "position", wand);
        simulation.BindAttribute("_UrsulaPos", "position", ursula);
        simulation.BindAttribute("_UrsulaUp", "up", ursula);

        simulation.BindAttribute("_Frame1", "frame1", this);
        simulation.BindAttribute("_Frame2", "frame2", this);
        simulation.BindAttribute("_Frame3", "frame3", this);
        simulation.BindAttribute("_Frame4", "frame4", this);

        transferLife.BindAttribute("_Radius", "radius", this);

        engine.BindData(simulation);
    }
Beispiel #19
0
    public override void Bind()
    {
        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);

        SetHairPosition.BindAttribute("_HairLength", "length", Hair);
        SetHairPosition.BindAttribute("_HairVariance", "variance", 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("_HairVariance", "variance", Hair);
        HairCollision.BindAttribute("_NumVertsPerHair", "numVertsPerHair", Hair);
        HairCollision.BindAttribute("transform", "transformArray", this);
    }
Beispiel #20
0
    // Use this for initialization
    public override void Bind()
    {
        setLife.BindAttribute("_HairsPerPoint", "hairsPerPoint", hairBunch);
        simLife.BindAttribute("_BunchOutForce", "_BunchOutForce", this);


        simLife.BindAttribute("_NoiseSize", "_NoiseSize", this);
        simLife.BindAttribute("_NoiseSpeed", "_NoiseSpeed", this);
        simLife.BindAttribute("_NoiseForce", "_NoiseForce", this);
        simLife.BindAttribute("_NormalForce", "_NormalForce", this);
        simLife.BindAttribute("_Dampening", "_Dampening", this);
        simLife.BindAttribute("_UpForce", "_UpForce", this);

        simLife.BindForm("_SDFBoneBuffer", bones);
    }
Beispiel #21
0
    public override void Bind()
    {
        life.BindPrimaryForm("_VertBuffer", particles);
        life.BindForm("_BaseBuffer", baseVerts);
        life.BindAttribute("_Transform", "transformMat", this);

        life.BindAttribute("_HeightMap", "heightMap", engine);
        life.BindAttribute("_MapSize", "size", engine);
        life.BindAttribute("_MapHeight", "height", engine);



        life.BindAttribute("_RayOrigin", "RayOrigin", touch);
        life.BindAttribute("_RayDirection", "RayDirection", touch);
    }
Beispiel #22
0
 // Use this for initialization
 void Start()
 {
     toBind.BindAttribute("_HandL", "handL", hands);
     toBind.BindAttribute("_HandR", "handR", hands);
 }
Beispiel #23
0
 // Use this for initialization
 public override void Bind()
 {
     toBind.BindForm("_SDFBoneBuffer", bones);
     toBind.BindAttribute("_Gravity", "gravity", this);
 }
Beispiel #24
0
 public override void Bind()
 {
     toBind.BindAttribute("_VertsPerGem", "numSidesOfGem", verts);
 }
Beispiel #25
0
 public override void Bind()
 {
     toBind.BindAttribute("_GirderLength", "_GirderLength", this);
     toBind.BindAttribute("_GirderWidth", "_GirderWidth", this);
 }
Beispiel #26
0
 public void BindData(Life life)
 {
     life.BindAttribute("_HeightMap", "heightMap", this);
     life.BindAttribute("_MapSize", "size", this);
     life.BindAttribute("_MapHeight", "height", this);
 }
Beispiel #27
0
    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);
    }
Beispiel #28
0
 // Use this for initialization
 public override void Bind()
 {
     toBind.BindAttribute("_Transform", "transformFloats", this);
 }