Disable too agressive culling of renderabletrails for now (closes #2653)

This commit is contained in:
Alexander Bock
2023-06-03 13:42:13 +02:00
parent a77a3e6156
commit 25292cef76
2 changed files with 12 additions and 12 deletions

View File

@@ -438,18 +438,18 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) {
_primaryRenderInformation.first;
// Culling
const glm::dvec3 trailPosWorld = glm::dvec3(
modelTransform * _primaryRenderInformation._localTransform *
glm::dvec4(0.0, 0.0, 0.0, 1.0)
);
const double distance = glm::distance(trailPosWorld, data.camera.eyePositionVec3());
//const glm::dvec3 trailPosWorld = glm::dvec3(
// modelTransform * _primaryRenderInformation._localTransform *
// glm::dvec4(0.0, 0.0, 0.0, 1.0)
//);
//const double distance = glm::distance(trailPosWorld, data.camera.eyePositionVec3());
if (distance > boundingSphere() * DISTANCE_CULLING_RADII) {
// Reset
global::renderEngine->openglStateCache().resetBlendState();
global::renderEngine->openglStateCache().resetDepthState();
return;
}
//if (distance > boundingSphere() * DISTANCE_CULLING_RADII) {
// // Reset
// global::renderEngine->openglStateCache().resetBlendState();
// global::renderEngine->openglStateCache().resetDepthState();
// return;
//}
// Render the primary batch of vertices
internalRender(