Re: Background Effect and Texture Formats w/ HDR
Posted: 18 May 2023, 19:27
Thank you!


Code: Select all
public class CopyRenderTexture : MonoBehaviour
{
public RenderTexture OutputRenderTexture { get; set; }
private void Awake()
{
OutputRenderTexture = new RenderTexture(Screen.width, Screen.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
UIStateMachine.Instance.ConfigureRenderTexture(OutputRenderTexture);
}
private void OnRenderImage(RenderTexture source, RenderTexture destination)
{
Graphics.Blit(source, OutputRenderTexture);
Graphics.SetRenderTarget(destination);
}
}
