首页 > 代码库 > UE4 径向模糊radiu blur
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。