-
Notifications
You must be signed in to change notification settings - Fork 368
Open
Description
diff-gaussian-rasterization/cuda_rasterizer/backward.cu
Lines 168 to 176 in 59f5f77
const float limx = 1.3f * tan_fovx; | |
const float limy = 1.3f * tan_fovy; | |
const float txtz = t.x / t.z; | |
const float tytz = t.y / t.z; | |
t.x = min(limx, max(-limx, txtz)) * t.z; | |
t.y = min(limy, max(-limy, tytz)) * t.z; | |
const float x_grad_mul = txtz < -limx || txtz > limx ? 0 : 1; | |
const float y_grad_mul = tytz < -limy || tytz > limy ? 0 : 1; |
Clamp (tx,ty) seems to make Gaussians closed to view space (ndc). And for remote huge Gaussians, it would contribute for rendering when its radius is larger than 0.3*tanfov. Why preprocess gaussian like this? Isn't that a bug?
diff-gaussian-rasterization/cuda_rasterizer/backward.cu
Lines 262 to 264 in 59f5f77
float dL_dtx = x_grad_mul * -h_x * tz2 * dL_dJ02; | |
float dL_dty = y_grad_mul * -h_y * tz2 * dL_dJ12; | |
float dL_dtz = -h_x * tz2 * dL_dJ00 - h_y * tz2 * dL_dJ11 + (2 * h_x * t.x) * tz3 * dL_dJ02 + (2 * h_y * t.y) * tz3 * dL_dJ12; |
And for the later grad computing of dL_dtz. It should be affected by the clamp, like clamp J[0,2] from "-fxtx/(tztz)" to "-fx/tz*clamp(fov)". But the above implementation ignore the clamp for dL_dtz.
Metadata
Metadata
Assignees
Labels
No labels