WebCamTexture on iOS

I’m using a WebCamTexture on iOS to display a live background from the back facing camera. Unfortunately the image is displayed to dark. Adding Unlit shaders in the Editor works, but as soon as I use a shader on iOS the live preview is not anymore shown.

Can I increase the brightness of the WebCamTexture without using a shader? Or is there any shader that works with this texture on the iOS? Furthermore, is it normal to consume a lot of GPU/CPU so that my models rotate much slower in the foreground?

Thanks, Thomas

excellent question

You're forcing a root/hierarchical structure onto objects which affects what objects affect others when moved, deleted etc when all that is wanted is object filtering. It also adds more processor load too.

1 Answer

1

Ok, seems I found the solution myself (except for the poor performance). I needed to define a material with the shader and assign it to the texture. Seems using the default material and assigning a shader with renderer.material.shader = Shader.Find(“Mobile/Unlit”) does not work. The shaders are just not there on the device as no material is using them…

excellent answer

Have you checked out [NatCam][1]? It is extremely performant on both iOS and Android. Make sure you check it out. [1]: https://www.assetstore.unity3d.com/en/#!/content/52154