Boat Attack使用了Universal RP的许多新图形功能,可以用于探索 Universal RP 的使用方式和技巧。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

45 行
1.4 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.LWRP;
namespace WaterSystem.Data
{
/// <summary>
/// This scriptable object stores teh graphical/rendering settings for a water system
/// </summary>
[System.Serializable][CreateAssetMenu(fileName = "WaterSettingsData", menuName = "WaterSystem/Settings", order = 0)]
public class WaterSettingsData : ScriptableObject
{
public GeometryType waterGeomType; // The type of geometry, either vertex offset or tessellation
public ReflectionType refType = ReflectionType.PlanarReflection; // How the reflecitons are generated
// planar
public PlanerReflections.PlanarReflectionSettings planarSettings; // Planar reflection settings
// cubemap
public Cubemap cubemapRefType; // custom cubemap reference
public bool isInfinite; // Is the water infinite (shader incomplete)
public Vector4 originOffset = new Vector4(0f, 0f, 500f, 500f);
}
/// <summary>
/// The type of reflection source, custom cubemap, closest refelction probe, planar reflection
/// </summary>
[System.Serializable]
public enum ReflectionType
{
Cubemap,
ReflectionProbe,
PlanarReflection
}
/// <summary>
/// The type of geometry, either vertex offset or tessellation
/// </summary>
[System.Serializable]
public enum GeometryType
{
VertexOffset,
Tesselation
}
}