看ProjectorMultiply.shader,有这么一句:

fixed4 texS = tex2Dproj (_ShadowTex, UNITY_PROJ_COORD(i.uvShadow));

查了一下:

UNITY_PROJ_COORD:given a 4-component vector, return a texture coordinate suitable for projected texture reads. On most platforms this returns the given value directly.

参考:https://docs.unity3d.com/412/Documentation/Components/SL-BuiltinMacros.html

tex2Dproj:either by explicitly dividing xunity,UNITY_PROJ_COORD和tex2Dproj and yunity,UNITY_PROJ_COORD和tex2Dproj by wunity,UNITY_PROJ_COORD和tex2Dproj or by using tex2Dproj.

参考:https://en.wikibooks.org/wiki/Cg_Programming/Unity/Projectors

相关文章:

  • 2021-07-29
  • 2021-07-25
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-14
  • 2021-07-02
  • 2021-06-27
  • 2021-12-03
  • 2021-12-25
  • 2021-09-18
  • 2021-10-24
相关资源
相似解决方案