UE4 径向模糊radiu blur

Posted Litmin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UE4 径向模糊radiu blur相关的知识,希望对你有一定的参考价值。

hlsl代码为:

 

  

 1 float2 ScreenMult = 1;
 2 int TexIndex = 14;
 3 float samples[10] = {-0.08,-0.05,-0.03,-0.02,-0.01,0.01,0.02,0.03,0.05,0.08};
 4 float2 dir = ScreenMult * float2(0.5,0.5) - UV; 
 5 float4 sum = SceneTextureLookup(UV, TexIndex, false);
 6 float2 pos = float2(0.0,0.0);
 7 for(int i = 0; i<10; i++)
 8 {
 9     pos = UV + dir * samples[i] * sampleDist;
10     max(min(pos, ScreenMult * float2(1.0, 1.0)), float2(0.0,0.0));
11     sum += SceneTextureLookup(pos, TexIndex, false);
12 }
13 sum *= 1.0/11.0;
14 return sum;

 

以上是关于UE4 径向模糊radiu blur的主要内容,如果未能解决你的问题,请参考以下文章

GLSL 径向模糊的奇怪问题

UE4 材质渐变节点 VectorToRadialValue(矢量到径向值)

css模糊效果

css blur模糊滤镜

使用 CSS 径向渐变添加模糊

径向模糊