• PerPixel Lighting


    最简单的光照就是在vertex shader中根据光照模型和法线计算光照,这种方法不能很好变现物体表面细节。后来诞生了Per-pixle lighting,把光照的计算推迟到每个像素上计算。大家耳熟能详的bump mapping就是种PPL技术。但是PPL虽好,却需要额外一张凹凸映射图,同时模型本身也需要计算binormal或者tangent向量。之前我们读3ds时候就发现连normal都没有,只我们自己计算的(参见如何导出3ds模型后计算法线)。如今又要计算另一个向量,好累呀。不过我们可以根据christian schuler的方法直接在pixel shader中计算tangent。试了下方法很不错,下面是效果Demo:

    参考:

    [1] Christian Schuler, Normal Mapping Without Precomputed Tangents.

    [2] Tomas Akenine-moller,Eric Haines,Naty Hoffman, Real-Time Rendering 3rd.

    [3] Jim Blinn, Simulation of Wrinkled Surfaces.

    [4]  Philip Taylor, Per-Pixel Lighting.

  • 相关阅读:
    02动手动脑
    动手动脑01
    千锤百炼软工6,7,8
    千锤百炼软工10.5
    千锤百炼软工10.4
    千锤百炼软工10.3
    千锤百炼软工10.2
    千锤百炼软工10.1
    千锤百炼软工9.30
    破解 webstorm
  • 原文地址:https://www.cnblogs.com/Baesky/p/bump_map_demo.html
Copyright © 2020-2023  润新知