NVlabs / nvdiffrast

Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering
Other
1.29k stars 139 forks source link

rasterize resolution limitation #132

Closed bitxsw93 closed 9 months ago

bitxsw93 commented 10 months ago

Hello,I have the same trouble with issue 128(https://github.com/NVlabs/nvdiffrast/issues/128).

I have a model which includes some ops. One of ops adopts nvdiffrast CUDA rasterizer.

And, resolution is 4096. So, For me, I want to support CUDA rasterizer operation up to 4096, instead of tile the model.

My Question: 1、What is the reason for 2048 limitation, cuda shared memory limit or something else? 2、Is there some way to support rasterizer operation with higher resolution?

Besh wishes.

s-laine commented 10 months ago

The reason for having a maximum resolution is that the rasterizer uses 32-bit fixed point math internally. Fixed-point representation is necessary to ensure exact coverage in rasterization, but it also forces a tradeoff between maximum viewport resolution and subpixel accuracy.

To answer the second question I would first need to know why the tile-based solution is not sufficient for your purposes. To the best of my knowledge, it produces the exact same image as a higher-resolution rasterization call would (up to floating-point rounding differences on the input side).

bitxsw93 commented 10 months ago

OK, Thanks. We try your suggestion from calling method first. If have any question, we give issues afterwards