Ilingis 发表于 2022-4-23 11:20

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

问题描述

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



PC正常效果

手机上的效果如图:



手机上的效果(不正确)

解决办法

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



打开 Full Precision

最终效果:



手机上的正常效果。

小结

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


[*]雾的效果制作:Cheap Fog in UE4 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
页: [1]
查看完整版本: UE4 安卓移动设备DepthFade不生效问题解决