Closed takiyu closed 3 years ago
Sorry for the late reply — the unnormalized barycentrics, i.e., edge function evaluations, can indeed be negative. However, the sign cancels out when normalizing by area of triangle which would also be negative in this case. Thus it is simpler to consider all of these quantities as signed and avoid the abs()
.
I have a question about backward of rasterization.
It seems that the code contains area calculation to obtain barycentric coordinate. However there was no
abs()
function.https://github.com/NVlabs/nvdiffrast/blob/main/nvdiffrast/common/rasterize.cu#L82
The case will not happen when 'a0', 'a1', and 'a2' are negative values?