Building fromNDC function for OpenCL

   1421   0   0
User Avatar
Member
60 posts
Joined: April 2006
Offline
Hi,
I am trying to recreate the fromNDC VEX function in OpenCL. I successfully did this with the toNDC function following Mario's tutorial [www.sidefx.com]

However, I cannot seem to get fromNDC to work. Basically I invert the multiplication of the 2 matrices (cam and perspective projection) and then multiply it by the vector4 of the NDC coordinates, assuming 0 to 1 normalization.

Attached a project file with 2 wranglers, one with the fromNDC VEX function working properly and the other with my non working attempt.

Thanks!

Image Not Found
Edited by perpen - Dec. 20, 2020 18:22:01

Attachments:
fromNDC_function.hiplc (108.8 KB)

  • Quick Links