Ue4管线中的灯光信息

http://www.tomlooman.com/disneyfaciliershadow/

 

看了这篇Blog我有了一个惊喜的发现:

float4 GetPerPixelLightAttenuation(float2 UV)
{
return Square(Texture2DSampleLevel(LightAttenuationTexture, LightAttenuationTextureSampler, UV, 0));
}

 

 

这个函数可以获得光照信息,这样很多效果都可以实现了。

测试了一下,这个效果只能在forward redner下使用。

posted @ 2017-06-12 10:36  湛蓝玫瑰  阅读(826)  评论(0编辑  收藏  举报