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

#pragma once

#include "common/FeatureFlags.ih"
#include "render/ScreenSample.ih"

OSPRAY_BEGIN_ISPC_NAMESPACE

struct Renderer;
struct SciVis;
struct FrameBuffer;
struct ScreenSample;
struct World;
struct RandomSampler;
struct DifferentialGeometry;

struct SciVisRenderContext
{
  const SciVis *uniform renderer;
  const FrameBuffer *uniform fb;
  const World *uniform world;
  ScreenSample sample;
  varying RandomSampler *uniform randomSampler;
};

SYCL_EXTERNAL vec3f lightAlpha(const uniform SciVis *uniform self,
    Ray &ray,
    RayCone &shadowCone,
    const World *uniform world,
    RandomSampler &randomSampler,
    vec3f weight,
    uniform float quality,
    const uniform FeatureFlagsHandler &ffh);

SYCL_EXTERNAL vec3f SciVis_computeAO(const uniform SciVis *uniform self,
    const World *uniform world,
    RandomSampler &randomSampler,
    const varying DifferentialGeometry &dg,
    const float coneWidth,
    const uniform int sampleCnt,
    const uniform float aoRadius,
    const varying vec3i &sampleID,
    const uniform FeatureFlagsHandler &ffh);

OSPRAY_END_ISPC_NAMESPACE
