I’m trying to achieve a stop motion effect similar to those claymation movies of the 50’s. I seem to be running into a problem though.
I’m taking a “snapshot” of the scene then waiting till enough time has passed (framerate speed), then replacing that snapshot with a new one… over and over.
The script seems to be working, BUT there is kind of a stuttering effect. It seems as if the image that is getting snapshotted, is blank. (All I see is grey)
Here is the script. Let me know if you guys notice anything funky. Thanks!
var frameRate:float;
private var nextFrame:float = 0;
function OnRenderImage(source:RenderTexture, dest:RenderTexture){
if(Time.time >= nextFrame){
Graphics.Blit(source, dest);
nextFrame = Time.time + (1/frameRate);
}
}