protected void SetupSliceDepthBuffers()
        {
            if (!this.aviePrefabInitialisationScript) {
            InitialisationScript apis = this.GetComponent<InitialisationScript>();
            this.aviePrefabInitialisationScript = apis;

            //apis.AddAllCameraRenderCallback(AllSlicesRendered);
            apis.AddSliceCameraRenderCallback(SliceCameraRenderDepthBuffer);

            foreach (ProjectorDescription p in apis.GetProjectorDescriptions())
            {
                RenderTexture projectorDepthBuffer = new RenderTexture(p._targetRenderTexture.width,
                                                                        p._targetRenderTexture.height,
                                                                        0
                                                                        );
                this.projectorDepthBuffers.Add(p, projectorDepthBuffer);
                this.projectorDepthBuffersList.Add(projectorDepthBuffer);
            }
            }
        }
Example #2
0
        protected void SetupSliceDepthBuffers()
        {
            if (!this.aviePrefabInitialisationScript)
            {
                InitialisationScript apis = this.GetComponent <InitialisationScript>();
                this.aviePrefabInitialisationScript = apis;

                //apis.AddAllCameraRenderCallback(AllSlicesRendered);
                apis.AddSliceCameraRenderCallback(SliceCameraRenderDepthBuffer);

                foreach (ProjectorDescription p in apis.GetProjectorDescriptions())
                {
                    RenderTexture projectorDepthBuffer = new RenderTexture(p._targetRenderTexture.width,
                                                                           p._targetRenderTexture.height,
                                                                           0
                                                                           );
                    this.projectorDepthBuffers.Add(p, projectorDepthBuffer);
                    this.projectorDepthBuffersList.Add(projectorDepthBuffer);
                }
            }
        }
 // Use this for initialization
 void Start()
 {
     myIs = this.GetComponent<InitialisationScript>();
 }
Example #4
0
 // Use this for initialization
 void Start()
 {
     myIs = this.GetComponent <InitialisationScript>();
 }