NVlabs / nvdiffrast

Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering
Other
1.35k stars 144 forks source link

Unit of image-space coordinates #8

Closed tiancheng-zhi closed 3 years ago

tiancheng-zhi commented 3 years ago

Hello! Thank you for open-sourcing this powerful tool.

When calculating the image-space derivative du/dX, etc. , using the image-space coordinate (X,Y), what is the unit of X and Y? Is the unit "pixel" (i.e., 0<=X<width, 0<=Y<height), or normalized coordinate (0<=X<=1, 0<=Y<=1)?

s-laine commented 3 years ago

Hi! In the image-space derivatives, the unit of X and Y is a pixel. This is similar to how they're defined in the hardware graphics pipeline. Thank you for the question - I'll add this information in the next revision of the documentation.

tiancheng-zhi commented 3 years ago

Thank you! that resolves my problem.