PixelShaderGen: prev should be initialized to the proper value; tev output needs to be clamped between -1024 and 1023.