Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any method to parallel set transform matrix? #209

Closed
wangzilu opened this issue Aug 13, 2023 · 4 comments
Closed

Is there any method to parallel set transform matrix? #209

wangzilu opened this issue Aug 13, 2023 · 4 comments

Comments

@wangzilu
Copy link

wangzilu commented Aug 13, 2023

in the sample interactive/int11/rotating boxes, in render function, use a for loop to set transform matrix to instance group, is there any possible do this in a CUDA Kernel ? suppose we have ten or hundred millions boxes, will this serial for loop become a performance bottleneck?

@ingowald
Copy link
Contributor

Yes, that would almost certainly be a performance bottleneck. In this case you're right that you'd want to set those transforms on the device, in a cuda kernel - but since nobody has asked for that yet this functionality doesn't exist ... yet.

I've actually been waiting for somebody to ask for that (because it's easier to add a feature if somebody actually uses it and gives feedback), so happy to look into adding that. If you could, could you send me an email (ingowald at gmail) with some more info as to what you're trying to do? If I do add that feature then I just as well add it in the most useful form :-)

@ingowald
Copy link
Contributor

I just had a quick look. It's a bit more of a change than just providing a gpu-side array of transforms - but it's doable. would still like an email discussion on what exactly you'd like to do - and whether my current plans for realizing it would work for your - but overall it should be doable

@wangzilu
Copy link
Author

wangzilu commented Aug 14, 2023

@ingowald thank you for your replying, I have sent you an email, looking forward to your discussion.

@wangzilu
Copy link
Author

wangzilu commented Aug 16, 2023

I have done this in InstanceGroup class by setting dd.optixInstanceBuffer in a CUDA Kernel:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants