首先,Render CustomDepth Pass选项位于Rendering模块中。

【UE4】如何判断是否勾选Custom Depth Pass

准备

新建材质,更改Material Domain为Post Process。

【UE4】如何判断是否勾选Custom Depth Pass

 在关卡中放入后期处理盒子(Post Process Volume),勾选Unbound,设置处理范围关卡中的所有内容。

【UE4】如何判断是否勾选Custom Depth Pass

添加刚才新建的材质到Post Process Materials数组中。 

【UE4】如何判断是否勾选Custom Depth Pass

关键

在选项未勾选时,Custom Depth为默认值10^8,当勾选选项后值更新为Scene Depth

因此,用Custom Depth减去Scene Depth,若值大于0——未勾选,值小于等于0——勾选。

【UE4】如何判断是否勾选Custom Depth Pass

随便拖入两个网格体,勾选立方体的Custom Depth Pass后可以看到颜色变成了红色。 

【UE4】如何判断是否勾选Custom Depth Pass

 

相关文章:

  • 2022-12-23
  • 2021-12-09
  • 2022-02-04
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-17
  • 2022-12-23
  • 2021-10-07
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案