WebCamTexture and VSync (iPhone 4)

I’ve got the camera displaying using the WebCamTexture class, and with a bit of tweaking to the requested width, height and FPS, it everything seemed to run very nicely on an iPhone 4S and an iPad 2.

HOWEVER, the very same code on an iPhone 4 results in horrendous screen tearing. This ONLY affects the WebCamTexture, not other game elements, so it’s not a VSync problem with the actual screen, but rather between the camera and the WebCamTexture.

There is a minor amount of tearing on the iPad 2 and iPhone 4S, as well, but it’s quite bearable.

I have tried adjusting the WebCamTexture settings available to me, but none seem to affect this.

Is there any way to force a WebCamTexture to only update when the camera has gotten a complete frame? Or am I missing something else that might be causing this?

I’ve had this issue as well. Performance seems to be very poor with it. The only way I’ve been able to avoid tearing is to not provide a requested width/height, but only set the frame rate to 30 fps. As a result, the texture ends up being very small (192x144 or something), but doesn’t tear.

I’m just curious what settings you’ve been using if you can get a smooth video feed at a higher resolution?

I get fairly smooth performance on the iPhone 4S and iPad 2 with the size of the texture set to the screen size (which seems appropriate for AR apps to me) and the frame-rate set to 30 (which I think is the max for those devices).

On the iPhone 4 (not S), I had to set the desired width and height to 16 (which oddly produces something much larger than 16x16 in appearance, though noticeably blurry) in order to avoid the tearing issue. I consider this a bit of a hacky fix (especially since I don’t see the direct correspondence between set size and appearance), though, and can’t see why we are unable to pull the full camera resolution at 30 FPS without tearing like other camera-centric apps. Maybe this feature is simply buggy as it is new with 3.5? It might explain the sparse (some would say “well-buried”) documentation on the subject, although I was hoping that I was just missing something.

You can specify the desired dimensions–>new WebcamTexture(Screen.width,Screen.height).After applying this I got the good results.
Also you should apply the right values for your background and cam,here is the link that u can have an idea about it: