does that mean, that one creates CUDA texture (in compressed format) and shares it with OptiX (don’t know if such interop option exists)?
If that can be made, than one would easily share OpenGL texture with CUDA, and that proxy CUDA-texture with Optix; that would help to solve the task.
Actually the app we are working on has OpenGL renderer, and we wanted to share scene assets resident textures (compressed) with OptiX to stay in fixed VRAM budget. That is why direct GL -> OptiX compressed textures sharing would help a lot!
The other option would be to support integer texture views onto compressed texture (in GL), that would allow to read texel blocks directly in kernel and decompress manually. But unfortunately one can not create integer texture view on compressed texture :(
CUDA does NOT support interop with this texture format between OpenGL. You have to allocate the texture in CUDA directly.
OptiX textures are built on top of CUDA; OptiX textures are CUDA textures, they are not interop with the CUDA context.
That means currently it would be possible to allocate this type of texture in CUDA/OptiX if we exposed it in the OptiX API, but NOT possible to share an existing allocation from OpenGL. What you want to do is reasonable but difficult to do right now.