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

#pragma once

#include "common/Ray.ih"
#include "common/RayCone.ih"
#include "rkcommon/math/vec.ih"

OSPRAY_BEGIN_ISPC_NAMESPACE

struct ScreenSample
{
  // input values to 'renderSample'
  vec3i sampleID; // x/y=pixelID, z=accumID/sampleID
  vec2f pos; // normalized screen coord, center of pixel, for backplate sampling
  Ray ray; // the primary ray generated by the camera
  RayCone rayCone;

  // return values from 'renderSample'
  vec3f rgb;
  float alpha;
  float z;
  vec3f normal;
  vec3f albedo;

  // IDs of primary ray hits. Invalid: unsigned RTC_INVALID_GEOMETRY_ID, 0xffff
  unsigned int primID;
  unsigned int geomID;
  unsigned int instID;
};

OSPRAY_END_ISPC_NAMESPACE
