-
In the OWL samples, I see two different ways of converting the LaunchIndex to the corresponding pixelIdx, which are: const vec2i pixelID = owl::getLaunchIndex();
const int pixelIdx = pixelID.x+self.fbSize.x*(self.fbSize.y-1-pixelID.y); and const vec2i pixelID = owl::getLaunchIndex();
const int pixelIdx = pixelID.x+self.fbSize.x*(pixelID.y); I understand that the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
One sample's pixel/window coordinate system seems to have its origin at the bottom, while the other origin is at the top. OWL doesn't have a concept of what a pixel coordinate system is, so it's totally up to the user. The viewer however does have such a concept, and as it uses OpenGL, its window coordinate system's origin is bottom/left. My guess is that one of the samples is interactive, and the other one is a cmdline sample, and the cmdline samples assume that the coordinate system origin is different, because they use SBT to write out images. Personally - and if that is actually the reason - I would prefer that all the samples use the same origin, and then use |
Beta Was this translation helpful? Give feedback.
One sample's pixel/window coordinate system seems to have its origin at the bottom, while the other origin is at the top.
OWL doesn't have a concept of what a pixel coordinate system is, so it's totally up to the user.
The viewer however does have such a concept, and as it uses OpenGL, its window coordinate system's origin is bottom/left.
My guess is that one of the samples is interactive, and the other one is a cmdline sample, and the cmdline samples assume that the coordinate system origin is different, because they use SBT to write out images.
Personally - and if that is actually the reason - I would prefer that all the samples use the same origin, and then use
stbi_flip_vertically_on_…