找回密码
 立即注册
查看: 275|回复: 0

UE4 安卓移动设备DepthFade不生效问题解决

[复制链接]
发表于 2022-4-23 11:20 | 显示全部楼层 |阅读模式
问题描述

笔者在制作简易的后处理雾效果的时候,发现在 PC 和 PC的移动设备预览时效果都正常,但是手机上却没有效果。
经排查发现后处理材质只给纯色到 Emissive Color 在手机上也有效,SceneTexture 也有效,问题主要出在 Depth Fade 上。
材质蓝图和PC效果如图:



PC正常效果

手机上的效果如图:



手机上的效果(不正确)

解决办法

打开后处理材质的 Full Precision 选项即可。



打开 Full Precision

最终效果:



手机上的正常效果。

小结

移动设备后处理材质中,如果使用到 DepthFade 节点,需要打开 Full Precision 才能正常计算保持和 PC 一致的效果。
参考资料


  • 雾的效果制作:Cheap Fog in UE4 [Depth-mask post process] https://www.youtube.com/watch?v=7TXe1rgpW2c
  • Does Depth Fade work on mobile Devices? Does Depth Fade work on mobile Devices?
  • WTF Is? Material - Depth Fade in Unreal Engine 4 https://www.youtube.com/watch?v=2BxrGjPcirk
  • Can't use depthfade but need similar usage. https://www.reddit.com/r/unrealengine/comments/2xndfp/cant_use_depthfade_but_need_similar_usage/
  • UE4 Separate Translucency After Postprocess litmin:UE4 Separate Translucency After Postprocess
  • UE4 CustomDepth mobile es3.1不起效问题 翼神:UE4 CustomDepth mobile es3.1不起效问题
  • How to create Depth Fade effect in OpenGL? How to create Depth Fade effect in OpenGL?
  • Pixel Depth Offset not working on Android Pixel Depth Offset not working on Android
  • PixelDepth — The PixelDepth expression outputs the depth, or distance from the camera, of the pixel currently being rendered. https://docs.unrealengine.com/4.27/en-US/RenderingAndGraphics/Materials/ExpressionReference/Depth
  • Object Blending with Dither Fade, Pixel Depth Offset and Distance Fields Object Blending with Dither Fade, Pixel Depth Offset and Distance Fields

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-9-22 13:40 , Processed in 0.091312 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表