• Advertisement
  • entries
    422
  • comments
    1540
  • views
    489620

First of the lighting models

Sign in to follow this  

73 views

Right, so I finally have something moderately technical to put in my journal. Hope you guys find it useful [grin]

This is an extension of yesterdays overview on lighting.

Blinn-Phong

This model is pretty much the defacto-standard kicking around today. It's also pretty similar to what you can get if you use the Direct3D fixed-function lighting. Seems like a good place to start.

There are a few similar variants kicking around, and this following equation is the one I'm going to use:



The subscript 'I' (Intensity) and 'C' (Colour) parts can be rolled into one, making there 3 colours in the equation: Ambient, Diffuse and Specular.

Inputs
  • Diffuse Texture Map
  • Specular Texture Map
  • Normal Texture Map

  • Ambient Term Constant
  • Specular Power Constant
  • Light Position Constant
  • Light Range Constant
  • Light Falloff Constant

  • World Matrix
  • World*View*Proj Matrix

    Vertex Data
  • Position
  • Normal (Computed with D3DXComputeNormals())
  • Tangent (Computed with D3DXComputeTangents())
  • TexCoord

    All fitting into this lovely Visio diagram:

  • Sign in to follow this  


    0 Comments


    Recommended Comments

    There are no comments to display.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    • Advertisement