Then your Shader Binding Table record needs to contain additional data behind the 32-byte header and that would need to be the device pointer to your float3 data buffer.
The same declaration methods as I described above apply. It’s just in a different struct, your SBT record.
That mechanism is described here: https://raytracing-docs.nvidia.com/optix7/guide/index.html#shader_binding_table#records
though just with a single float3 element for a color instead of a device pointer to an array of float3 data.
You access that SBT record data with the OptiX device function optixGetSbtDataPointer()
https://raytracing-docs.nvidia.com/optix7/guide/index.html#shader_binding_table#sbt-record-access-on-device
If you search the OptiX SDK example source code for that function, you’ll find examples which are storing different data there.
In my examples I use an SBT hit record per instance and the SBT hit record data stores a pointer to a structure which contains device pointers to the interleaved vertex attribute data, the triangle indices buffer of the referenced GAS and two integers for the material and light IDs.
Data structure stored in my SBT hit records: https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/nvlink_shared/shaders/system_data.h#L95
SBT record definition: https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/nvlink_shared/inc/Device.h#L197
SBT record pointer usage inside the device program: https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/nvlink_shared/shaders/closesthit.cu#L128
You would need a simpler variant of that using your device pointer directly (depending on what your scene structure and SBT layout is).
Also read this older thread again: https://forums.developer.nvidia.com/t/sbt-theoretical-quesions/179309