// Copyright 2009 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#ifdef OSPRAY_ENABLE_VOLUMES

#pragma once

#include "../common/DifferentialGeometry.ih"
#include "../common/Ray.ih"
#include "Volume.ih"
#include "transferFunction/TransferFunctionShared.h"
// c++ shared
#include "VolumetricModelShared.h"

OSPRAY_BEGIN_ISPC_NAMESPACE

inline void VolumetricModel_postIntersect(const VolumetricModel *uniform self,
    varying DifferentialGeometry &dg,
    const varying Ray &ray,
    uniform int64)
{
  dg.Ng = make_vec3f(0.f);
  dg.Ns = make_vec3f(0.f);
  dg.dPds = make_vec3f(0.f);
  dg.dPdt = make_vec3f(0.f);
  dg.st = make_vec2f(0);
  dg.color = make_vec4f(0.f);
  dg.primID = 0;
  dg.objID =
      (self->userID == RTC_INVALID_GEOMETRY_ID) ? ray.geomID : self->userID;
  dg.areaPDF = 0.f;
  dg.epsilon = 0.f;
  dg.material = NULL;
}

OSPRAY_END_ISPC_NAMESPACE

#endif
