我们创建了 Fontainebleau 演示来说明摄影photogrammetry流程和 LayeredLit 着色器的使用。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

32 行
879 B

using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
[Serializable]
public class DOFPlayable : PlayableBehaviour
{
public float focusDistance = 1;
[Range(0.1f,32f)]
public float aperture = 5.6f;
[Range(1f, 300f)]
public float focalLength = 50f;
}
[Serializable]
public class DOFPlayableAsset : PlayableAsset, ITimelineClipAsset
{
public DOFPlayable dofPlayable = new DOFPlayable();
// Create the runtime version of the clip, by creating a copy of the template
public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
{
return ScriptPlayable<DOFPlayable>.Create(graph, dofPlayable);
}
// Use this to tell the Timeline Editor what features this clip supports
public ClipCaps clipCaps
{
get { return ClipCaps.Blending | ClipCaps.Extrapolation; }
}
}