Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2014-05-13 10:13:27 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-05-13 10:13:27 +0400
commit2055e968df654ade2a7a477dcc7c134b1f65dcb8 (patch)
tree096d015f0f5e6abb35847deaac19b6263e48fc66
parent43f3e79ceeb92c5373b22fb64fdf2ed9c781d5cd (diff)
Fix T38379: Mesh vertices only update when in cone of last created spotlight
The shadow render passes could set a mesh's modified status to false even if they were not rendered. This means their display lists do not get updated. For now, just skip setting all buckets' modified to false during shadow render passes.
-rw-r--r--source/gameengine/Rasterizer/RAS_BucketManager.cpp38
1 files changed, 17 insertions, 21 deletions
diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
index eaa9b3df494..f90b5959f76 100644
--- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
@@ -228,28 +228,24 @@ void RAS_BucketManager::Renderbuckets(const MT_Transform& cameratrans, RAS_IRast
RenderSolidBuckets(cameratrans, rasty);
RenderAlphaBuckets(cameratrans, rasty);
- /* All meshes should be up to date now */
- /* Don't do this while processing buckets because some meshes are split between buckets */
- BucketList::iterator bit;
- list<RAS_MeshSlot>::iterator mit;
- for (bit = m_SolidBuckets.begin(); bit != m_SolidBuckets.end(); ++bit) {
- /* This (and the similar lines of code for the alpha buckets) is kind of a hacky fix for #34382. If we're
- * drawing shadows and the material doesn't cast shadows, then the mesh is still modified, so we don't want to
- * set MeshModified to false yet. This will happen correctly in the main render pass.
- */
- if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && !(*bit)->GetPolyMaterial()->CastsShadows())
- continue;
-
- for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) {
- mit->m_mesh->SetMeshModified(false);
+ /* If we're drawing shadows and bucket wasn't rendered (outside of the lamp frustum or doesn't cast shadows)
+ * then the mesh is still modified, so we don't want to set MeshModified to false yet (it will mess up
+ * updating display lists). Just leave this step for the main render pass.
+ */
+ if (rasty->GetDrawingMode() != RAS_IRasterizer::KX_SHADOW) {
+ /* All meshes should be up to date now */
+ /* Don't do this while processing buckets because some meshes are split between buckets */
+ BucketList::iterator bit;
+ list<RAS_MeshSlot>::iterator mit;
+ for (bit = m_SolidBuckets.begin(); bit != m_SolidBuckets.end(); ++bit) {
+ for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) {
+ mit->m_mesh->SetMeshModified(false);
+ }
}
- }
- for (bit = m_AlphaBuckets.begin(); bit != m_AlphaBuckets.end(); ++bit) {
- if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && !(*bit)->GetPolyMaterial()->CastsShadows())
- continue;
-
- for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) {
- mit->m_mesh->SetMeshModified(false);
+ for (bit = m_AlphaBuckets.begin(); bit != m_AlphaBuckets.end(); ++bit) {
+ for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) {
+ mit->m_mesh->SetMeshModified(false);
+ }
}
}