6.5.1一维纹理

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

发布了673 篇原创文章 · 获赞 18 · 访问量 28万+

猜你喜欢

转载自blog.csdn.net/directx3d_beginner/article/details/103924751