volfmath / Off-Screen-Particles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Off-Screen-Particles

​ Render the Particles to a half-resolusion texture and blend to full resolution according to the depth distribution. If the interpolated depth is closer to the depth of the point sample, the color of the point sample is filled, otherwise the color of the linear sample is filled.

Effective Compare

GroudTruth

GroudTruth

UE_Effective

In the case of DepthFade, there is aliasing due to direct sampling of SceneColor

SampleSceneColor

My_Effective

DepthLoad

Try to use the original depth texture directly when using DepthFade

DepthLoad

FrameFetch

DepthFrameFetch

Optimization Result

Before:

image-Before

After:

image-After

How To Use It

  • 对于要离屏渲染的材质勾选bDownSampleSeparateTranslucencyimage-20200729163613071
  • 确认Engine中开启r.Mobile.SeparateTranslucency

TIPS

  • 低端机本来Shading消耗就比较少,不太适用这个技术,比较适合于中端手机。
  • 若粒子有多个非Opaque材质请全部勾选,否则会渲染两次粒子。仅支持Translucency与Additive
  • 目前不支持MSAA,待后续需求

PS

  • Mobile平台不会写出SceneDepth,所有深度信息要从Alpha中获取。

About


Languages

Language:C++ 100.0%