Merge remote-tracking branch 'refs/remotes/origin/master' into culling
This commit is contained in:
@@ -469,6 +469,8 @@ namespace Nz
|
||||
Renderer::DrawPrimitivesInstanced(renderedBillboardCount, PrimitiveMode_TriangleStrip, 0, 4);
|
||||
}
|
||||
while (billboardCount > 0);
|
||||
|
||||
billboardVector.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -769,6 +771,7 @@ namespace Nz
|
||||
}
|
||||
}
|
||||
}
|
||||
instances.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,6 +291,7 @@ namespace Nz
|
||||
declaration->EnableComponent(ParticleComponent_Normal, ComponentType_Float3, NazaraOffsetOf(ParticleStruct_Billboard, normal));
|
||||
declaration->EnableComponent(ParticleComponent_Position, ComponentType_Float3, NazaraOffsetOf(ParticleStruct_Billboard, position));
|
||||
declaration->EnableComponent(ParticleComponent_Rotation, ComponentType_Float1, NazaraOffsetOf(ParticleStruct_Billboard, rotation));
|
||||
declaration->EnableComponent(ParticleComponent_Size, ComponentType_Float2, NazaraOffsetOf(ParticleStruct_Billboard, size));
|
||||
declaration->EnableComponent(ParticleComponent_Velocity, ComponentType_Float3, NazaraOffsetOf(ParticleStruct_Billboard, velocity));
|
||||
|
||||
NazaraAssert(declaration->GetStride() == sizeof(ParticleStruct_Billboard), "Invalid stride for declaration ParticleLayout_Billboard");
|
||||
|
||||
@@ -68,7 +68,12 @@ namespace Nz
|
||||
|
||||
std::size_t x = tileIndex % m_mapSize.x;
|
||||
std::size_t y = tileIndex / m_mapSize.x;
|
||||
Vector3f tileLeftCorner(x * m_tileSize.x, y * -m_tileSize.y, 0.f);
|
||||
|
||||
Vector3f tileLeftCorner;
|
||||
if (m_isometricModeEnabled)
|
||||
tileLeftCorner.Set(x * m_tileSize.x + m_tileSize.x/2.f * (y % 2), y/2.f * -m_tileSize.y, 0.f);
|
||||
else
|
||||
tileLeftCorner.Set(x * m_tileSize.x, y * -m_tileSize.y, 0.f);
|
||||
|
||||
*colorPtr++ = tile.color;
|
||||
*posPtr++ = instanceData->transformMatrix.Transform(tileLeftCorner);
|
||||
|
||||
Reference in New Issue
Block a user