Commit 6ddbfdf7 authored by Eduardo Olivares's avatar Eduardo Olivares

More NVIDIA-IndeX-plug-in 2.3 fixes

- Fixed random disspearing of irregular volumes in PV-Server.
- Fixed broken tile rendering.
- Gradient kernel cleanup.
parent 809ca595
......@@ -12,7 +12,7 @@ NV_IDX_XAC_VERSION_1_0
struct Gradient_params
{
float gradient; // [0.1, 1] gradient value
float gradient; // [0.01, 1] gradient value
float grad_max; // 20.0f maximum gradient scale
float dummy1;
float dummy2;
......@@ -74,9 +74,6 @@ public:
// check if sample can be skipped
if (sample_color.w < min_alpha) return NV_IDX_PROG_DISCARD_SAMPLE;
// compute volume gradient (local version)
//const float3 vol_grad = get_gradient(sampler, sample_position, dh);
// compute volume gradient (use trilinear filter for gradients)
const float3 vol_grad = volume_gradient<Volume_filter_mode::TRILINEAR>(
sparse_volume,
......
......@@ -767,7 +767,7 @@
</IntVectorProperty>
<DoubleVectorProperty
label="Level"
label="Gradient Level"
name="gradient_level"
command="set_gradient_level"
number_of_elements="1"
......@@ -787,7 +787,7 @@
</DoubleVectorProperty>
<DoubleVectorProperty
label="Scale"
label="Gradient Scale"
name="gradient_scale"
command="set_gradient_scale"
number_of_elements="1"
......
......@@ -90,6 +90,8 @@ vtknvindex_irregular_volume_mapper::vtknvindex_irregular_volume_mapper()
m_kd_tree = NULL;
m_prev_property = "";
m_last_MTime = 0;
vtkMath::UninitializeBounds(m_whole_bounds);
}
//----------------------------------------------------------------------------
......
......@@ -130,10 +130,10 @@ void vtknvindex_opengl_canvas::receive_tile(
{
m_vtk_renderer->GetRenderWindow()->MakeCurrent();
const mi::Uint32 src_width = area.max.x - area.min.x;
const mi::Uint32 src_height = area.max.y - area.min.y;
const mi::Sint32 src_width = area.max.x - area.min.x;
const mi::Sint32 src_height = area.max.y - area.min.y;
if (src_width == 0 || src_height == 0)
if (src_width <= 0 || src_height <= 0)
{
return;
}
......@@ -158,6 +158,9 @@ void vtknvindex_opengl_canvas::receive_tile(
area.max.x > tile.max.x ? tile.max.x : area.max.x,
area.max.y > tile.max.y ? tile.max.y : area.max.y };
if (src_tile.min.x >= src_tile.max.x || src_tile.min.y >= src_tile.max.y)
return;
const mi::math::Bbox_struct<mi::Uint32, 2> dst_tile = { src_tile.min.x - tile.min.x,
src_tile.min.y - tile.min.y, src_tile.max.x - tile.min.x, src_tile.max.y - tile.min.y };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment