Function addIntersection

Synopsis

#include <Source/Falcor/Raytracing/RtProgram/RtProgram.h>

Desc & addIntersection(uint32_t typeIndex, const std::string &intersection)

Description

No description yet.

Source

Lines 138-153 in Source/Falcor/Raytracing/RtProgram/RtProgram.cpp. Line 90 in Source/Falcor/Raytracing/RtProgram/RtProgram.h.

RtProgram::Desc& RtProgram::Desc::addIntersection(uint32_t typeIndex, const std::string& intersection)
{
    if (typeIndex >= mIntersectionEntryPoints.size())
    {
        mIntersectionEntryPoints.resize(typeIndex + 1);
    }
    else if (mIntersectionEntryPoints[typeIndex] != uint32_t(-1))
    {
        throw std::exception(("There is already an intersection shader defined at primitive type index " + std::to_string(typeIndex)).c_str());
    }
    assert(!intersection.empty());
    mIntersectionEntryPoints[typeIndex] = mBaseDesc.declareEntryPoint(ShaderType::Intersection, intersection);
    return *this;
}





Add Discussion as Guest

Log in