Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions brayns/io/MorphologyLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ bool MorphologyLoader::importCircuit(const servus::URI& circuitConfig,
return false;
}
const Matrix4fs& transforms = circuit.getTransforms(gids);

const brain::URIs& uris = circuit.getMorphologyURIs(gids);

brain::GIDSet cr_gids;
Expand Down Expand Up @@ -917,8 +916,10 @@ bool MorphologyLoader::_positionInCircuitBoundingBox(
Vector2f MorphologyLoader::_getOffsetAsVector2f(const uint64_t offset)
{
Vector2f offsets;
offsets.x() = static_cast<float>(offset % NO_OFFSET);
offsets.y() = std::floor(static_cast<uint32_t>(offset / NO_OFFSET));
double y = offset / NO_OFFSET;
double x = offset - y * NO_OFFSET;
offsets.x() = x;
offsets.y() = y;
return offsets;
}

Expand Down
4 changes: 3 additions & 1 deletion plugins/engines/ospray/ispc/render/SimulationRenderer.ispc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ inline varying vec4f
lightEmission = make_vec3f(0.f);
varying vec4f color = make_vec4f(0.f);
varying float value = 0.f;
varying int64 index = dg.st.y * 1e6 + dg.st.x;
double x = dg.st.x;
double y = dg.st.y;
varying uint64 index = y * NO_OFFSET + x;
if (index >= 0 && index < self->simulationDataSize)
value = self->simulationData[index];
else
Expand Down
1 change: 1 addition & 0 deletions plugins/engines/ospray/ispc/render/utils/Consts.ih
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@
#define DEFAULT_VOLUME_SHADOW_THRESHOLD 0.5f
#define DEFAULT_SKYBOX_INTENSITY 0.3f
#define NB_MAX_SAMPLES_PER_RAY 32
#define NO_OFFSET 1e6f