I have successfully added Optix and normal rendering is working fine even with very complicated objects and light settings. I wanted to add Instancing support now but I am not able to find any samples or examples for it.
Can some one please point to any reference sample or give example of instancing usage here?
Some questions :
Lets say I have two mesh in my scene.
Square and Sphere. Out if this Sphere has two instances.
Currently , I am just creating one GAS and putting geometry even for instances. So sphere geometry will be duplicated.
Now all research I did on instancing I think I need to create one GAS for Square (lets call it GAS1) then one for sphere geometry (lets call it GAS2).
One more GAS for instance and in structure of OptixInstance I pass traversable handle of GAS2.
The unclear part starts here,
I have three GAS handles.
- How will Optix recognize all this three handles to use ? ( should I just put them in Launch Params when calling OptixLaunch) ?
It would be great if some one can tell me my observations on creation of instancing are right and if yes then how to set up these multiple AS.