50 lines
1.1 KiB
C#
50 lines
1.1 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[Serializable]
|
|
public class setupVertexLitShader : MonoBehaviour
|
|
{
|
|
public Color VertexLitTranslucencyColor;
|
|
|
|
public int VertexLitWaveScale;
|
|
|
|
public int VertexLitDetailDistance;
|
|
|
|
public setupVertexLitShader()
|
|
{
|
|
VertexLitTranslucencyColor = new Color(0.73f, 0.85f, 0.4f, 1f);
|
|
VertexLitWaveScale = 2;
|
|
VertexLitDetailDistance = 60;
|
|
}
|
|
|
|
public virtual void Start()
|
|
{
|
|
Shader.SetGlobalColor("_VertexLitTranslucencyColor", VertexLitTranslucencyColor);
|
|
Shader.SetGlobalFloat("_VertexLitWaveScale", VertexLitWaveScale);
|
|
float[] array = new float[32];
|
|
array[9] = VertexLitDetailDistance;
|
|
Camera.main.layerCullDistances = array;
|
|
}
|
|
|
|
public virtual void Update()
|
|
{
|
|
if (Input.GetKeyDown("1"))
|
|
{
|
|
Camera.main.renderingPath = RenderingPath.Forward;
|
|
}
|
|
if (Input.GetKeyDown("2"))
|
|
{
|
|
Camera.main.renderingPath = RenderingPath.DeferredLighting;
|
|
}
|
|
if (Input.GetKeyDown("3"))
|
|
{
|
|
GameObject gameObject = GameObject.Find("01 Sun");
|
|
gameObject.transform.Rotate(Vector3.up * 30f, Space.World);
|
|
}
|
|
}
|
|
|
|
public virtual void Main()
|
|
{
|
|
}
|
|
}
|