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
本文深入探讨了阴影渲染技术的关键步骤,包括使用NiNew为NiCamera分配内存、收集场景中的遮挡物几何信息、渲染遮挡物几何体并将其投影到近平面作为纹理,以及利用光照相机裁剪地面并捕捉视锥体与地面的交点。
388

被折叠的 条评论
为什么被折叠?



