template<> float3 rtTex{1/2/3}D is missing?


I looked at both the API reference and optix_device.h and I could not find texture function for float3 defined. However, I see texture functions for float, float2 and float4 defined in optix_device.h. I can certainly work around this but this is absolutely ridiculous.


This is not ridiculous, OptiX is just requiring you to follow the proper practices meant for CUDA. Each warp request on the GPU fetches 32 or 128 bytes of global memory. If your data is aligned properly to a multiple of 4 bytes(float), 8 bytes(float2), 16 bytes(float4), you will more likely improve your bus utilization and reduce the number of memory transactions.

This is mentioned in page 70 of Optix Programming Guide 3.0.

In addition, there are no 3-components textures in the table of supported CUDA to OpenGL or D3D interoperability texture formats in Appendix A, in case you want to share texture resources.

Thanks for your answer.

This Optix forum has been very helpful, but I would appreciate more if the documentation is written more clearly. To be specific, on p.415 of the 3.0 API reference, it would be great if you can list out all the supported formats instead of just saying

"There are
also C++ template and C-style additional declarations for other texture types (char1, uchar1, char2, uchar2

Also, the Optix C++ part in the programming guide isn’t very helpful too. Maybe I am stupid, I’ve spent some time on guessing the function names too, which shouldn’t be the case for clearly written documentations…

Agreed that there should be more information on supported texture types.

The C++ API is documented in the OptiX_Utility_Library_Reference.pdf file. It’s generated from information found in the header files, but it should all be in there.