I want to freeze the camera texture but CameraDevice.Instance.Stop() has a delay which makes it pretty much useless for my application. So I want to freeze the camera texture manualy. I have tried this:
[CODE]vidScreenTextureTemp = Instantiate(vidScreen.renderer.material.mainTexture) as Texture2D;vidScreenTextureTemp = vidScreen.renderer.material.mainTexture as Texture2D;vidScreen.renderer.material.mainTexture = vidScreenTextureTemp;[CODE]
But this does not freeze the camera texture so somewhere there is still a reference instead of a hard copy of the texture. I tried this as well, but that just makes the texture black:
[CODE]vidScreenTextureTemp = Instantiate(vidScreen.renderer.material.mainTexture) as Texture2D;vidScreen.renderer.material.mainTexture = vidScreenTextureTemp;[CODE]
Any ideas?
Manually freezing camera texture
Manually freezing camera texture
Can't this be done in a shader? Edit: Ok, I can't work around this bug so I posted a bug report in another thread.