Added call to DeallocateTextures() in OnInputSizeChanged and OnOutputSizeChanged to ensure textures are deallocated if filter has changed.