コード例 #1
0
    public override void Bind()
    {
        for (int i = 0; i < passes.Length; i++)
        {
            passes[i].BindPrimaryForm("_SkeletonBuffer", skeleton);
            passes[i].BindForm("_BaseBuffer", baseVerts);
        }

        transfer.BindPrimaryForm("_VertBuffer", verts);
        transfer.BindForm("_SkeletonBuffer", skeleton);
        transfer.BindForm("_OGBuffer", ogVerts);
    }
コード例 #2
0
ファイル: HairTips.cs プロジェクト: yazici/AVA
    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);
    }
コード例 #3
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);
    }
コード例 #4
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(parallel);

        parallel.BindFloat("_Radius", () => this.radius);
    }
コード例 #5
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);
    }
コード例 #6
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);
    }
コード例 #7
0
ファイル: ParticlesOnParticleSim.cs プロジェクト: yazici/AVA
    public override void Bind()
    {
        sim.BindPrimaryForm("_VertBuffer", particles);
        sim.BindForm("_BaseBuffer", particles.baseForm);

        sim.BindAttribute("_ParticlesPerParticle", "particlesPerParticle", particles);
    }
コード例 #8
0
    public override void Bind()
    {
        set.BindPrimaryForm("_VertBuffer", Points);
        set.BindForm("_ConnectionBuffer", Connections);


        force.BindPrimaryForm("_VertBuffer", Points);
        force.BindForm("_ConnectionBuffer", Connections);


        constraint.BindPrimaryForm("_VertBuffer", Points);
        constraint.BindForm("_ConnectionBuffer", Connections);


        resolve.BindPrimaryForm("_VertBuffer", Points);
        resolve.BindForm("_ConnectionBuffer", Connections);


        pass.BindPrimaryForm("_VertBuffer", Points);
        pass.BindForm("_ConnectionBuffer", Connections);



        force.BindFloats("_Transform", () => this.transformArray);
        constraint.BindFloats("_Transform", () => this.transformArray);
        resolve.BindFloats("_Transform", () => this.transformArray);
        set.BindFloats("_Transform", () => this.transformArray);
        pass.BindFloats("_Transform", () => this.transformArray);

        data.BindCameraData(force);
        data.BindRayData(force);
        data.BindPlayerData(force);
    }
コード例 #9
0
    public override void Bind()
    {
        set.BindPrimaryForm("_VertBuffer", Hair);
        set.BindForm("_BaseBuffer", Base);
        force.BindInt("_HairsPerVert", () => (int)Hair.countMultiplier);

        force.BindPrimaryForm("_VertBuffer", Hair);
        force.BindForm("_BaseBuffer", Base);
        force.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);
        force.BindInt("_HairsPerVert", () => (int)Hair.countMultiplier);

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

        resolve.BindPrimaryForm("_VertBuffer", Hair);
        resolve.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);


        pass.BindPrimaryForm("_VertBuffer", Hair);
        pass.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
        force.BindFloat("_HairLength", () => Hair.length);
        force.BindFloat("_HairVariance", () => Hair.variance);
        force.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);
        force.BindFloats("_Transform", () => this.transformArray);

        data.BindCameraData(force);
    }
コード例 #10
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);

        marchingLife.BindPrimaryForm("_VolumeBuffer", form);
        marchingLife.BindForm("_VertBuffer", verts);

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

        marchingLife.BindMatrix("_Transform", () => transform.localToWorldMatrix);

        marchingLife.BindTexture("Texture", () => ((Form3D)form)._texture);


        resetLife.BindPrimaryForm("_VolumeBuffer", form);
        marchingResetLife.BindPrimaryForm("_VertBuffer", verts);
        marchingResetLife.BindForm("_VolumeBuffer", form);
    }
コード例 #11
0
 public override void Bind()
 {
     life.BindForm("_HumanBuffer", humanBuffer);
     life.BindFloat("_HumanRadius", () => this.radius);
     life.BindFloat("_HumanForce", () => this.power);
     life.BindInt("_ParticlesPerPerson", () => this._ParticlesPerPerson);
 }
コード例 #12
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.BindPrimaryForm("_VertBuffer", Hair);
        constraint0.BindInt("_NumVertsPerHair", () => Hair.numVertsPerHair);

        constraint1.BindInt("_Pass", 1);
        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);
    }
コード例 #13
0
ファイル: SmoothHair.cs プロジェクト: yazici/AVA
    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);
    }
コード例 #14
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();
    }
コード例 #15
0
ファイル: HairNoise.cs プロジェクト: yazici/AVA
 // 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);
 }
コード例 #16
0
    public override void Bind()
    {
        simulate.BindInt("_Frame", () => frame);
        simulate.BindPrimaryForm("_VertBuffer", verts);
        simulate.BindForm("_ConnectionBuffer", connections);

        resolve.BindPrimaryForm("_VertBuffer", verts);
        resolve.BindForm("_ConnectionBuffer", connections);


        closest.Set(verts);
    }
コード例 #17
0
    public override void Bind()
    {
        sim.BindPrimaryForm("_VertBuffer", verts);
        sim.BindForm("_InfoBuffer", info);
        sim.BindForm("_ConnectionBuffer", connections);


        sim.BindVector3("_RO", () => _RO);
        sim.BindVector3("_RD", () => _RD);
        sim.BindInt("_SelectedVert", () => selectedVert);
        sim.BindInt("_ActiveVert", () => activeVert);

        closest.BindPrimaryForm("_VertBuffer", verts);
        closest.BindVector3("_RO", () => _RO);
        closest.BindVector3("_RD", () => _RD);


        resolve.BindInt("_SelectedVert", () => selectedVert);
        resolve.BindPrimaryForm("_VertBuffer", verts);
        resolve.BindForm("_ConnectionBuffer", connections);
    }
コード例 #18
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);
    }
コード例 #19
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);
    }
コード例 #20
0
    public override void Bind()
    {
        Set.BindPrimaryForm("_VertBuffer", Particles);
        Set.BindForm("_ConnectionList", ConnectionList);

        Forces.BindPrimaryForm("_VertBuffer", Particles);
        Forces.BindForm("_ConnectionList", ConnectionList);

        Constraint.BindPrimaryForm("_VertBuffer", Particles);
        Constraint.BindForm("_ConnectionList", ConnectionList);

        Resolve.BindPrimaryForm("_VertBuffer", Particles);
        Resolve.BindForm("_ConnectionList", ConnectionList);
    }
コード例 #21
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);
    }
コード例 #22
0
    public override void Bind()
    {
        force.BindPrimaryForm("_VertBuffer", verts);
        force.BindForm("_SkeletonBuffer", skeleton);

        // force.BindAttribute( "_NumVertsPerHair" , "numVertsPerHair", skeleton );
        //  force.BindAttribute( "_NumHairs" , "numHairs", skeleton );

        constrain.BindPrimaryForm("_VertBuffer", verts);
        constrain.BindForm("_SkeletonBuffer", skeleton);

        //constrain.BindAttribute( "_NumVertsPerHair" , "numVertsPerHair", skeleton );
        //constrain.BindAttribute( "_NumHairs" , "numHairs", skeleton );
        constrain.BindAttribute("_Length", "armLength", this);
    }
コード例 #23
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);
    }
コード例 #24
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);
    }
コード例 #25
0
    public override void Bind()
    {
        life.BindPrimaryForm("_ParticleBuffer", particles);
        life.BindForm("_VertBuffer", verts);

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


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

        resolve.BindPrimaryForm("_ParticleBuffer", particles);


        data.BindRayData(life);
    }
コード例 #26
0
    // 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);
    }
コード例 #27
0
    public override void Bind()
    {
        force.BindPrimaryForm("_VertBuffer", verts);
        force.BindForm("_SkeletonBuffer", skeleton);

        force.BindInt("_NumVertsPerHair", () => skeleton.numVertsPerHair);
        force.BindInt("_NumHairs", () => skeleton.numHairs);
        force.BindInt("_VertsPerVert", () => verts.vertsPerVert);

        constrain.BindPrimaryForm("_VertBuffer", verts);
        constrain.BindForm("_SkeletonBuffer", skeleton);

        constrain.BindInt("_NumVertsPerHair", () => skeleton.numVertsPerHair);
        constrain.BindInt("_NumHairs", () => skeleton.numHairs);
        constrain.BindInt("_VertsPerVert", () => verts.vertsPerVert);
        constrain.BindFloat("_Length", () => this.armLength);
    }
コード例 #28
0
    public override void _Bind()
    {
        transfer.BindPrimaryForm("_VertBuffer", verts);

        if (skeleton != null)
        {
            transfer.BindForm("_SkeletonBuffer", skeleton);
        }

        data.BindCameraData(transfer);

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

        Bind();
    }
コード例 #29
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);
    }
コード例 #30
0
 public void SelfBind(Life toBind)
 {
     toBind.BindInt("_ParticlesPerParticle", () => this.particlesPerParticle);
     toBind.BindForm("_BaseBuffer", baseParticles);
     toBind.BindPrimaryForm("_VertBuffer", this);
 }