// Copyright 2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "AMRVolumeShared.h"

inline void AMRVolume_transformObjectToLocal(
    const AMRVolume *VKL_INTEROP_UNIFORM volume,
    const varying vec3f &objectCoordinates,
    varying vec3f &localCoordinates)
{
  localCoordinates =
      rcp(volume->gridSpacing) * (objectCoordinates - volume->gridOrigin);
}
