Exemple #1
0
        protected override void OnEnable()
        {
            base.OnEnable();
            switch (motionVectorState)
            {
            case MotionVectorState.Static:
                drawFunction = () => PipelineFunction.DrawNoMotionVectors(ref buffers, proceduralMat);
                break;

            case MotionVectorState.DynamicWithMotionVector:
                drawFunction = () =>
                {
                    PipelineFunction.SetLastFrameMatrix(ref buffers, ref lastVPMatrix);
                    //Add Movement Operations here
                    PipelineFunction.Draw(ref buffers, proceduralMat);
                };
                break;

            case MotionVectorState.DynamicWithoutMotionVector:
                //Add Movement Operations here
                drawFunction = () => PipelineFunction.DrawNoMotionVectors(ref buffers, proceduralMat);
                break;
            }
        }
Exemple #2
0
 public override void OnPreRenderEvent()
 {
     PipelineFunction.SetCullingBuffer(ref buffers);
     PipelineFunction.RunCulling(ref viewMatrix, ref projMatrix, ref rtProjMatrix, ref buffers);
     drawFunction();
 }
Exemple #3
0
 private void OnDestroy()
 {
     PipelineFunction.Dispose(ref buffers);
 }
Exemple #4
0
 private void Awake()
 {
     PipelineFunction.InitBuffers(ref buffers, allExtents, localToWorldMatrices, mesh);
 }