Tech Demo: GPU Cook-Torrance Illumination Model

YouTube Preview Image

Downloads:

Comments: In this demo I have implemented the cook-torrance brdf equation via shaders. All the calculations are done in a fragment/pixel shader without fetch any term from a lookup table. The objective of this demo was to implement a complete brdf in gpu so its not optimized.

Algorithm: Cook-Torrance illumination model via shaders (without precomputed equation terms).

Technology: C++, DirectX 9.0c, HlSl, Win32, Visual Studio 2005

Develop/Build/Test Machine Specs

  • Intel Pentium 4, 3000 MHz
  • 1024 MB (PC3200 DDR SDRAM)
  • GeForce 7800 GS (256 MB)
  • DirectX 4.09.00.0904 (DirectX 9.0c)

Resources:

5 Responses to “Tech Demo: GPU Cook-Torrance Illumination Model”

  1. pplux says:

    This one really looks far better :) well done !

  2. leonardo miguel obregon says:

    hello
    this Cook-Torrance pluyin or it programs that probes with a lot of gentilesa to use it, truly is interesting, but and seen that you can also use in 3d max, not you if you could help me, to have it for 3d max 8 and like I make so that it works inside 3d max 8, the very grateful estares and the one brought that iseere with cu programs or plugin will be sent so that he/she sees that I give him a good use.
    thank you and I expect their help, a student that wants to learn but.
    thank you and excuse the nuisance.

  3. leonardo miguel obregon says:

    hello
    this Cook-Torrance pluyin or it programs that probes with a lot of gentilesa to use it, truly is interesting, but and seen that you can also use in 3d max, not you if you could help me, to have it for 3d max 8 and like I make so that it works inside 3d max 8, the very grateful estares and the one brought that iseere with cu programs or plugin will be sent so that he/she sees that I give him a good use.
    thank you and I expect their help, a student that wants to learn but.
    thank you and excuse the nuisance.

    nota: leonjesuel@yahoo.es/jesuslen@hotmail.com

  4. qazqaz says:

    I think that in Fresnel term it should be NL rather then NV. Fresnel
    do not depend on camera position.

  5. Ruben Penalva says:

    Hi qazqz,
    thank you very much for taking the time reviewing the code. I really appreciate it.

    I use Christophe Schlick´s approximation for fresnel term. You can check his paper here:
    http://dept-info.labri.u-bordeaux.fr/~schlick/DOC/eur2.html

    Best Regards,
    Ruben Penalva