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); } } }
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>(); }
// Use this for initialization void Start() { myIs = this.GetComponent <InitialisationScript>(); }