An apparatus comprising: a graphics rendering engine of a graphics processing unit, GPU, configured to render a first plurality of images during runtime at a first sample count; and at least one processor (200, 1030) configured to: execute first program code to perform image denoising by a machine-learning engine (1500, 1600, 1810), wherein the machine-learning engine (1500, 1600, 1810) is configured to denoise each of the first plurality of images during runtime using trained weights; generate, during runtime, one or more new reference regions in one or more of the first plurality of images at a second sample count greater than the first sample count; render reference pixel colors from each new reference region and noisy reference pixel inputs from a corresponding low sample count region; and perform runtime training of the machine-learning engine (1500, 1600, 1810) using the one or more new reference regions, wherein runtime training comprises an evaluation of the one or more new reference regions in combination with the corresponding low sample count region in the at least one of the first plurality of images to update the trained weights accordingly. a graphics rendering engine of a graphics processing unit, GPU, configured to render a first plurality of images during runtime at a first sample count; and at least one processor (200, 1030) configured to: execute first program code to perform image denoising by a machine-learning engine (1500, 1600, 1810), wherein the machine-learning engine (1500, 1600, 1810) is configured to denoise each of the first plurality of images during runtime using trained weights; generate, during runtime, one or more new reference regions in one or more of the first plurality of images at a second sample count greater than the first sample count; render reference pixel colors from each new reference region and noisy reference pixel inputs from a corresponding low sample count region; and perform runtime training of the machine-learning engine (1500, 1600, 1810) using the one or more new reference regions, wherein runtime training comprises an evaluation of the one or more new reference regions in combination with the corresponding low sample count region in the at least one of the first plurality of images to update the trained weights accordingly. execute first program code to perform image denoising by a machine-learning engine (1500, 1600, 1810), wherein the machine-learning engine (1500, 1600, 1810) is configured to denoise each of the first plurality of images during runtime using trained weights; generate, during runtime, one or more new reference regions in one or more of the first plurality of images at a second sample count greater than the first sample count; render reference pixel colors from each new reference region and noisy reference pixel inputs from a corresponding low sample count region; and perform runtime training of the machine-learning engine (1500, 1600, 1810) using the one or more new reference regions, wherein runtime training comprises an evaluation of the one or more new reference regions in combination with the corresponding low sample count region in the at least one of the first plurality of images to update the trained weights accordingly.