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

 

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

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

 

 

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

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

相关文章:

  • 2021-06-30
  • 2021-12-17
  • 2021-06-29
  • 2021-08-07
  • 2021-05-03
  • 2021-04-12
  • 2021-05-23
  • 2022-01-29
猜你喜欢
  • 2021-12-27
  • 2021-11-12
  • 2021-10-20
  • 2021-12-05
  • 2021-05-08
  • 2022-12-23
  • 2021-08-24
相关资源
相似解决方案