您的位置:首页 > 移动开发 > Objective-C

MOUT的Shadow渲染流程

2009-08-27 17:58 211 查看
1. NiNew NiCamera
   --> NiMemObject::operator new(NI_MEMHINT_NONE,__FILE__,__LINE__,__FUNCTION__)
     --> NiMemManager::Get().Allocate(..)
       --> Allocator::Allocate(..)

 

2. SetCaster:
  -->ShadowGeometry::RecursiveStoreCasterObjects(NiAVObject* pkObject)
    -->Store All Geometries(NiMesh) of the given pkObject into a list
      -->Store the Terrain as Ground
     
3. Render Shadow:
  -->Click():
   -->Update Camera Location + Let Camera enclose the watched object
    -->Render all Caster's Geometries with Light Camera: Projected into Near Plane
       then As Texture
       -->use light camera to cull ground
         -->capture all intersection points(View Frustum and Ground)
           -->build a triangle mesh using intersections
             -->find the intersection point of camera view dir onto ground as center
               -->measure the diff between an intersection point and this center
                  as texture coord in s and t           
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  function object list file