重点在于使用原来计算漫反射光强的值作为纹理坐标的索引来查找颜色值
    float fDiffuse = (dot(In.Normal, normalize(In.vLight)) + 1.0 ) / 2.0;
    return tex1D(MeshTextureSampler, fDiffuse );

6.5.1一维纹理

相关文章:

  • 2021-10-24
  • 2021-08-07
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-16
  • 2021-09-18
  • 2021-10-06
  • 2022-12-23
  • 2021-11-22
  • 2021-09-26
  • 2022-12-23
相关资源
相似解决方案