浏览代码

Removed the duplicate FrameInfo structure for shadow rendering as unnecessary.

Lasse Öörni 14 年之前
父节点
当前提交
62e5541039
共有 2 个文件被更改,包括 1 次插入6 次删除
  1. 1 4
      Engine/Graphics/View.cpp
  2. 0 2
      Engine/Graphics/View.h

+ 1 - 4
Engine/Graphics/View.cpp

@@ -139,8 +139,6 @@ void View::Update(const FrameInfo& frame)
     frame_.frameNumber_ = frame.frameNumber_;
     frame_.frameNumber_ = frame.frameNumber_;
     frame_.viewSize_ = IntVector2(width_, height_);
     frame_.viewSize_ = IntVector2(width_, height_);
     
     
-    shadowFrame_ = frame_;
-    
     // Clear old light scissor cache, geometry, light, occluder & batch lists
     // Clear old light scissor cache, geometry, light, occluder & batch lists
     lightScissorCache_.Clear();
     lightScissorCache_.Clear();
     geometries_.Clear();
     geometries_.Clear();
@@ -435,7 +433,6 @@ void View::GetBatches()
                 shadowQueue.shadowCamera_ = shadowCameras_[j];
                 shadowQueue.shadowCamera_ = shadowCameras_[j];
                 shadowQueue.nearSplit_ = shadowNearSplits_[j];
                 shadowQueue.nearSplit_ = shadowNearSplits_[j];
                 shadowQueue.farSplit_ = shadowFarSplits_[j];
                 shadowQueue.farSplit_ = shadowFarSplits_[j];
-                shadowFrame_.camera_ = shadowCamera;
                 
                 
                 // Setup the shadow split viewport and finalize shadow camera parameters
                 // Setup the shadow split viewport and finalize shadow camera parameters
                 shadowQueue.shadowViewport_ = GetShadowMapViewport(light, j, lightQueue.shadowMap_);
                 shadowQueue.shadowViewport_ = GetShadowMapViewport(light, j, lightQueue.shadowMap_);
@@ -450,7 +447,7 @@ void View::GetBatches()
                     for (unsigned l = 0; l < numBatches; ++l)
                     for (unsigned l = 0; l < numBatches; ++l)
                     {
                     {
                         Batch shadowBatch;
                         Batch shadowBatch;
-                        drawable->GetBatch(shadowBatch, shadowFrame_, l);
+                        drawable->GetBatch(shadowBatch, frame_, l);
                         
                         
                         Technique* tech = GetTechnique(drawable, shadowBatch.material_);
                         Technique* tech = GetTechnique(drawable, shadowBatch.material_);
                         if (!shadowBatch.geometry_ || !tech)
                         if (!shadowBatch.geometry_ || !tech)

+ 0 - 2
Engine/Graphics/View.h

@@ -178,8 +178,6 @@ private:
     int maxOccluderTriangles_;
     int maxOccluderTriangles_;
     /// Information of the frame being rendered.
     /// Information of the frame being rendered.
     FrameInfo frame_;
     FrameInfo frame_;
-    /// Information of the frame being rendered, with shadow camera.
-    FrameInfo shadowFrame_;
     /// Camera frustum.
     /// Camera frustum.
     Frustum frustum_;
     Frustum frustum_;
     /// Combined bounding box of visible geometries.
     /// Combined bounding box of visible geometries.