Closed pysmeeatioj closed 6 months ago
Yes, both are possible. For depth, compute per-vertex camera-space depths and use the interpolate
op with that as a vertex attribute to get a differentiable depth map. Similarly, to render a normal buffer, construct per-vertex normal vectors in any space you like, and interpolate those to get a per-pixel result.
Yes, both are possible. For depth, compute per-vertex camera-space depths and use the
interpolate
op with that as a vertex attribute to get a differentiable depth map. Similarly, to render a normal buffer, construct per-vertex normal vectors in any space you like, and interpolate those to get a per-pixel result.
Thank you for your prompt reply! Are there any examples or tutorials for reference?
thinks, it works! I get normal map by the depth gradient. And it is differentiable.
op of nvd
Can you share your code example for obtaining the normal map?
Is there a way to render depth using nvdiffrast? And can it remain differentiable? What about the normal map?