48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
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;
|
||
}
|