-
Notifications
You must be signed in to change notification settings - Fork 324
/
RetroPresentation.cs
32 lines (29 loc) · 1011 Bytes
/
RetroPresentation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Project: Daggerfall Unity
// Copyright: Copyright (C) 2009-2023 Daggerfall Workshop
// Web Site: http://www.dfworkshop.net
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
// Source Code: https://github.com/Interkarma/daggerfall-unity
// Original Author: Gavin Clayton (interkarma@dfworkshop.net)
// Contributors:
//
// Notes:
//
using UnityEngine;
namespace DaggerfallWorkshop.Utility
{
/// <summary>
/// Presents final retro rendering to viewport.
/// </summary>
public class RetroPresentation : MonoBehaviour
{
public RenderTexture RetroPresentationSource;
private void OnRenderImage(RenderTexture source, RenderTexture destination)
{
if (RetroPresentationSource && DaggerfallUnity.Settings.RetroRenderingMode != 0)
{
// Present retro render
Graphics.Blit(RetroPresentationSource, null as RenderTexture);
}
}
}
}