60 lines
1.2 KiB
C#
60 lines
1.2 KiB
C#
using UnityEngine;
|
|
|
|
namespace Artngame.SKYMASTER.SSRT
|
|
{
|
|
public class SSRTToggle : MonoBehaviour
|
|
{
|
|
private SSRT ssrt;
|
|
|
|
private void Start()
|
|
{
|
|
ssrt = GetComponent<SSRT>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if ((bool)ssrt)
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Alpha1))
|
|
{
|
|
ssrt.enabled = true;
|
|
ssrt.debugMode = SSRT.DebugMode.Combined;
|
|
ssrt.lightOnly = false;
|
|
ssrt.directLightingAO = false;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Alpha3))
|
|
{
|
|
ssrt.enabled = true;
|
|
ssrt.debugMode = SSRT.DebugMode.GI;
|
|
ssrt.lightOnly = false;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Alpha2))
|
|
{
|
|
ssrt.enabled = false;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Alpha4))
|
|
{
|
|
ssrt.enabled = true;
|
|
ssrt.debugMode = SSRT.DebugMode.GI;
|
|
ssrt.lightOnly = true;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Alpha5))
|
|
{
|
|
ssrt.enabled = true;
|
|
ssrt.debugMode = SSRT.DebugMode.Combined;
|
|
ssrt.lightOnly = false;
|
|
ssrt.directLightingAO = true;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.F))
|
|
{
|
|
ssrt.resolutionDownscale = SSRT.ResolutionDownscale.Full;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.H))
|
|
{
|
|
ssrt.resolutionDownscale = SSRT.ResolutionDownscale.Half;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|