Documentation error regarding Cop2 X/Y globals?

   1432   0   0
User Avatar
Member
2 posts
Joined: 5月 2016
Offline
Hi, I'm not sure which subforum to post this in, hopefully this is ok!

I recently ran into some issues using a slightly outdated version of the SideFX Labs Maps Baker node in Houdini 18, where there was a significant (half pixel) offset on my baked result. The solution is to add half half a pixel to the X and Y globals before using them with a uvsample call. I noticed when making this post that this fix had been updated in the most recent build of the sideFX Labs tools.

The cop2 vex context documentation [www.sidefx.com] describes X and Y as:
location of the center of the current pixel being shaded in the range 0 to 1. Zero being the bottom of the image, and 1 being the top.

The behavior described above would lead me to believe that the X and Y globals actually return the top left corner of the current pixel. Are the docs wrong, or is something else going on here?
Edited by Joseph Silverman - 2020年5月17日 17:33:25
  • Quick Links