Skip to content

Commit 0b42e4f

Browse files
Make the colormap behavior in the viskores ANARI device match helide (vistle#535)
- Ensure m_inTransform and m_inOffset are applied in Image1DSampler (through a new worklet). - Add m_useValueRange and m_valueRange to the viskores device's Geometry class, so the user can set the range used for the color map themselves (more detailed explanations see PR)
1 parent fa531cf commit 0b42e4f

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
url = https://github.com/vistle/tetgen.git
6363
[submodule "lib/3rdparty/viskores"]
6464
path = lib/3rdparty/viskores
65-
url = https://github.com/Viskores/viskores.git
65+
url = https://github.com/DeVasconcelos/viskores.git
6666
[submodule "lib/3rdparty/mpi-serial"]
6767
path = lib/3rdparty/mpi-serial
6868
url = https://github.com/vistle/mpi-serial.git

module/render/ANARemote/anarirenderobject.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,12 @@ void AnariRenderObject::create(anari::Device device)
366366
if (haveColor) {
367367
anari::setParameter(device, mat, "color", "color");
368368
} else if (useSampler) {
369-
if (colorMap)
369+
if (colorMap) {
370370
anari::setParameter(device, mat, "color", colorMap->sampler);
371-
else
371+
anari::setParameter(device, geom, "useValueRange", true);
372+
} else {
372373
anari::unsetParameter(device, mat, "color");
374+
}
373375
} else if (hasSolidColor) {
374376
anari::setParameter(device, mat, "color",
375377
anari::std_types::vec4{static_cast<float>(solidColor[0]), static_cast<float>(solidColor[1]),

0 commit comments

Comments
 (0)