Type of curveArray.flag?

Hi,

In OptiX 7.1.0 SDK sample optixHair (line 104 of optixHair.cpp):

buildInput.curveArray.flag = OPTIX_GEOMETRY_FLAG_NONE;

The docs say:
[…]unsigned int OptixBuildInputCurveArray::flag
Combination of OptixGeometryFlags describing the primitive behavior.[…]
https://raytracing-docs.nvidia.com/optix7/api/html/struct_optix_build_input_curve_array.html

Its clear, the sample is for demonstration only, but I did not find any information what type
of flags is set there. So is it safe to use it this way (I added no anyhit program there) :

buildInput.curveArray.flag = OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT;

Thank you.

Yes, that works like the flags in the other OptixBuildInputs and takes OptixGeometryFlags.
https://raytracing-docs.nvidia.com/optix7/api/html/group__optix__types.html#ga1405d971960ccde46cc2c5771f34fc76

Just that the flag field is not an array in this case because there is only one SBT entry per OptixBuildInputCurveArray supported.

More information about the differences and current limitations here:
https://raytracing-docs.nvidia.com/optix7/guide/index.html#curves#curves

1 Like