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

48 lines
1.4 KiB
C#
Raw Normal View History

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