Optix Primvars #1344
-
Hey, I'm tring to setup osl in my optix renderer but I'm unsure how it's supposed to handle mesh primvars. It looks like I'm suposed to extend render services getattribute for the CPU implementation (I could be wrong), but I am unsure what I am supposed to do in the case of optix which doesn't support virtual functions. Hopefully this makes sense, tell me if I am being completely stupid. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Think I have found the answer to this myself. For anyone else wondering see rend_lib.cu. Functions like osl_getattribute or osl_printf get compiled in a certain way before runtime (LLVM_COMPILE_CUDA in the cmake example). Then inserted into the "lib_bitcode" attribute so the shaders can access them when they are converted to ptx. |
Beta Was this translation helpful? Give feedback.
Think I have found the answer to this myself.
For anyone else wondering see rend_lib.cu. Functions like osl_getattribute or osl_printf get compiled in a certain way before runtime (LLVM_COMPILE_CUDA in the cmake example). Then inserted into the "lib_bitcode" attribute so the shaders can access them when they are converted to ptx.