Minor - Rework skysphere from Object to Entity - V14.2.0
Introduces a skysphere entity to the scene. Creates the skysphere during application initialization and manages its visibility via Z-buffer enabling/disabling in the render system. The skysphere is now an ECS entity. The culling thread skips the skybox entity to avoid unnecessary calculations since it's always visible. The position of the skybox is updated with the active camera.
This commit is contained in:
@@ -238,6 +238,16 @@ public:
|
||||
// V<>rifier si le mod<6F>le est visible
|
||||
if (!render->IsVisible()) continue;
|
||||
|
||||
// check if the id the sky id to disabled the z buffer
|
||||
if (entity->GetID() == entityManager->GetSkyID())
|
||||
{
|
||||
// D<>sactiver le Z-buffer pour le skysphere
|
||||
m_deviceContext->OMSetDepthStencilState(nullptr, 0);
|
||||
} else {
|
||||
// Activer le Z-buffer pour les autres entit<69>s
|
||||
m_deviceContext->OMSetDepthStencilState(nullptr, 1);
|
||||
}
|
||||
|
||||
// Effectuer le rendu
|
||||
if (RenderEntity(entity, viewMatrix, projectionMatrix,
|
||||
diffuseColors, lightPositions, ambientColors,cameraPos,
|
||||
|
||||
Reference in New Issue
Block a user