目录
关于后处理
volumn的概念和操作就不多说了
网上也很多文章和说法了
我是也不相信就是配置一下,点2个按钮,这么简单的操作,还需要大量,重新说的?
这不是3岁小孩天生就懂的?
=======================
关于后处理,官方没说的是:
1.官方没说能在游戏用,更没说能在手游用
2.官方是有升级的,是新东西吧,比旧的volumn好,起码ui比较新,但我没说好用啊
3.URP不能用
4.我大官方的Profiles就这么多,一向这么多,已经很多了
PostProcess可用资源
- 官方HDR例子
- PostProcess Profies v3
- URP 系列教程 | 如何在 URP 的 Camera Stack 中使用 Post processing(文末有福利) - 哔哩哔哩 (bilibili.com)
如何在URP使用后处理
????
建立一个CameraPP,选择RenderType == Overlay,用于后处理
在Renderding 处,要勾选postProcess。选择cullingmask == nothing
添加volumn组件
Mode - Global - 默认
Mode - Local - 需要另外配Collider,挺麻烦和不可控的。。。
然后该干嘛,干嘛
。。。。。
。。
。
最后,注意主摄像机组件(component),也要勾选postprocess,(不确定) 否则运行时不正常显示,
但是,官方是建议你在主摄像机这么干的
官方URP教程参考
URP系列教程 | 多相机玩法攻略 - Unity中文课堂 (u3d.cn)
当然:时至今日,URP也是能用后处理了
class Volume{
internal void UpdateLayer()
{
//重点在于 Volumnmanager
int layer = gameObject.layer;
if (layer != m_PreviousLayer)
{
VolumeManager.instance.UpdateVolumeLayer(this, m_PreviousLayer, layer);
m_PreviousLayer = layer;
}
}
}
//都是在namespace UnityEngine.Rendering
class VolumeManager{
/// <summary>
/// Updates the Volume manager and stores the result in a custom <see cref="VolumeStack"/>.
/// </summary>
/// <param name="stack">The stack to store the blending result into.</param>
/// <param name="trigger">A reference Transform to consider for positional Volume blending.
/// </param>
/// <param name="layerMask">The LayerMask that Unity uses to filter Volumes that it should consider
/// for blending.</param>
/// <seealso cref="VolumeStack"/>
public void Update(VolumeStack stack, Transform trigger, LayerMask layerMask)
{
}
class ColorAdjustments{
//继承自 VolumeComponent,并没有什么用
//就是,记录配置数据()
//传到内部 .Interp()
//内部是用 Shader做处理的
//所以,ColorAdjustments.cs本身美什么代码
}
class VolumeComponentMenu:Attribute{
public virtual void Override(VolumeComponent state, float interpFactor)
{
int count = parameters.Count;
for (int i = 0; i < count; i++)
{
var stateParam = state.parameters[i];
var toParam = parameters[i];
if (toParam.overrideState)
{
// Keep track of the override state for debugging purpose
stateParam.overrideState = toParam.overrideState;
stateParam.Interp(stateParam, toParam, interpFactor);
}
}
}
}