NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Scene/PostProcessInstructor.cs

48 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.Serialization;
public enum PostProcessTextureUnitSize
{
_256 = 256,
_512 = 512,
}
public class PostProcessInstructor : MonoBehaviour
{
[FormerlySerializedAs("combinedRoots")]
[LabelText("需要网格合并节点")]
[ListDrawerSettings(AlwaysAddDefaultValue = false)]
public List<Transform> rootsToCombine = new();
[FormerlySerializedAs("art")]
[LabelText("网格合并后父节点")]
public Transform combinedObjectsRoot;
[LabelText("地面")]
public GameObject ground;
[LabelText("雾")]
public GameObject fog;
[LabelText("后处理预制体")]
public bool processPrefab;
[LabelText("单位贴图尺寸")]
public PostProcessTextureUnitSize postProcessTextureUnitSize = PostProcessTextureUnitSize._256;
[LabelText("后处理指定材质")]
public List<Material> sampleMaterials = new();
[LabelText("启用分组合批")]
[Tooltip("启用分组合批可以减少单次渲染的对象数量但会增加DrawCall")]
public bool enableBatchGrouping = false;
[LabelText("分组合批距离")]
[Tooltip("物体之间的距离超过此值将被分到不同组,距离越大分组越少;距离越小分组越多")]
[Range(2.0f, 50.0f)]
public float batchGroupDistance = 8.0f;
}