关于Tangent的W Component

  /** Sets whether to store tangent space parity in the W of a 4-component tangent or not.
  @remarks
   The default element format to use is VET_FLOAT3 which is enough to accurately
   deal with tangents that do not involve any texture coordinate mirroring.
   If you wish to allow UV mirroring in your model, you must enable 4-component
   tangents using this method, and the 'w' co-ordinate will be populated
   with the parity of the triangle (+1 or -1), which will allow you to generate
   the bitangent properly.
  @param enable true to enable 4-component tangents (default false). If you enable
   this, you will probably also want to enable mirror splitting (see setSplitMirrored),
   and your shader must understand how to deal with the parity.
  */
  void setStoreParityInW(bool enabled) { mStoreParityInW = enabled; }

 

 4-component的w是用于存储 处理镜像UV的TANGENT方向,在Shader中需要有相应的对应。

posted @ 2010-06-24 23:05  胡文杰  阅读(450)  评论(0编辑  收藏  举报