Browse Source

Missed some Drawable components.

PrimitiveWaste 11 years ago
parent
commit
aec08d2e11

+ 1 - 0
Source/Engine/Graphics/BillboardSet.cpp

@@ -186,6 +186,7 @@ void BillboardSet::UpdateBatches(const FrameInfo& frame)
     
     
     batches_[0].distance_ = distance_;
     batches_[0].distance_ = distance_;
     batches_[0].numWorldTransforms_ = 2;
     batches_[0].numWorldTransforms_ = 2;
+    batches_[0].shaderParameters_ = HasShaderParameters() ? &shaderParameters_ : 0;
     // Billboard positioning
     // Billboard positioning
     transforms_[0] = relative_ ? node_->GetWorldTransform() : Matrix3x4::IDENTITY;
     transforms_[0] = relative_ ? node_->GetWorldTransform() : Matrix3x4::IDENTITY;
     // Billboard rotation
     // Billboard rotation

+ 2 - 0
Source/Engine/Graphics/DecalSet.cpp

@@ -220,6 +220,8 @@ void DecalSet::UpdateBatches(const FrameInfo& frame)
     batches_[0].distance_ = distance_;
     batches_[0].distance_ = distance_;
     if (!skinned_)
     if (!skinned_)
         batches_[0].worldTransform_ = &worldTransform;
         batches_[0].worldTransform_ = &worldTransform;
+
+    batches_[0].shaderParameters_ = HasShaderParameters() ? &shaderParameters_ : 0;
 }
 }
 
 
 void DecalSet::UpdateGeometry(const FrameInfo& frame)
 void DecalSet::UpdateGeometry(const FrameInfo& frame)

+ 2 - 0
Source/Engine/Graphics/Skybox.cpp

@@ -58,6 +58,7 @@ void Skybox::ProcessRayQuery(const RayOctreeQuery& query, PODVector<RayQueryResu
 
 
 void Skybox::UpdateBatches(const FrameInfo& frame)
 void Skybox::UpdateBatches(const FrameInfo& frame)
 {
 {
+    bool hasShaderParameters = HasShaderParameters();
     distance_ = 0.0f;
     distance_ = 0.0f;
 
 
     if (frame.frameNumber_ != lastFrame_)
     if (frame.frameNumber_ != lastFrame_)
@@ -75,6 +76,7 @@ void Skybox::UpdateBatches(const FrameInfo& frame)
     {
     {
         batches_[i].worldTransform_ = &it->second_;
         batches_[i].worldTransform_ = &it->second_;
         batches_[i].distance_ = 0.0f;
         batches_[i].distance_ = 0.0f;
+        batches_[i].shaderParameters_ = hasShaderParameters ? &shaderParameters_ : 0;
     }
     }
 }
 }
 
 

+ 1 - 0
Source/Engine/Graphics/TerrainPatch.cpp

@@ -120,6 +120,7 @@ void TerrainPatch::UpdateBatches(const FrameInfo& frame)
     
     
     batches_[0].distance_ = distance_;
     batches_[0].distance_ = distance_;
     batches_[0].worldTransform_ = &worldTransform;
     batches_[0].worldTransform_ = &worldTransform;
+    batches_[0].shaderParameters_ = HasShaderParameters() ? &shaderParameters_ : 0;
     
     
     unsigned newLodLevel = 0;
     unsigned newLodLevel = 0;
     for (unsigned i = 0; i < lodErrors_.Size(); ++i)
     for (unsigned i = 0; i < lodErrors_.Size(); ++i)

+ 2 - 0
Source/Engine/UI/Text3D.cpp

@@ -102,6 +102,7 @@ void Text3D::ApplyAttributes()
 
 
 void Text3D::UpdateBatches(const FrameInfo& frame)
 void Text3D::UpdateBatches(const FrameInfo& frame)
 {
 {
+    bool hasShaderParameters = HasShaderParameters();
     distance_ = frame.camera_->GetDistance(GetWorldBoundingBox().Center());
     distance_ = frame.camera_->GetDistance(GetWorldBoundingBox().Center());
     
     
     if (faceCameraMode_ != FC_NONE)
     if (faceCameraMode_ != FC_NONE)
@@ -116,6 +117,7 @@ void Text3D::UpdateBatches(const FrameInfo& frame)
     {
     {
         batches_[i].distance_ = distance_;
         batches_[i].distance_ = distance_;
         batches_[i].worldTransform_ = faceCameraMode_ != FC_NONE ? &customWorldTransform_ : &node_->GetWorldTransform();
         batches_[i].worldTransform_ = faceCameraMode_ != FC_NONE ? &customWorldTransform_ : &node_->GetWorldTransform();
+        batches_[i].shaderParameters_ = hasShaderParameters ? &shaderParameters_ : 0;
     }
     }
 }
 }