mirror of
https://git.datalinker.icu/kijai/ComfyUI-Hunyuan3DWrapper.git
synced 2026-05-13 16:20:09 +08:00
Update rasterizer_gpu.cu
This commit is contained in:
parent
8bf6060bd9
commit
bc9e498c13
@ -18,7 +18,7 @@ __device__ void rasterizeTriangleGPU(int idx, float* vt0, float* vt1, float* vt2
|
|||||||
if (isBarycentricCoordInBounds(baryCentricCoordinate)) {
|
if (isBarycentricCoordInBounds(baryCentricCoordinate)) {
|
||||||
int pixel = py * width + px;
|
int pixel = py * width + px;
|
||||||
if (zbuffer == 0) {
|
if (zbuffer == 0) {
|
||||||
atomicExch((unsigned long long*)&zbuffer[pixel],(unsigned long long)(idx + 1));
|
atomicExch(reinterpret_cast<unsigned long long*>(&zbuffer[pixel]),static_cast<unsigned long long>(idx + 1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
float depth = baryCentricCoordinate[0] * vt0[2] + baryCentricCoordinate[1] * vt1[2] + baryCentricCoordinate[2] * vt2[2];
|
float depth = baryCentricCoordinate[0] * vt0[2] + baryCentricCoordinate[1] * vt1[2] + baryCentricCoordinate[2] * vt2[2];
|
||||||
@ -31,7 +31,7 @@ __device__ void rasterizeTriangleGPU(int idx, float* vt0, float* vt1, float* vt2
|
|||||||
INT64 token = (INT64)z_quantize * MAXINT + (INT64)(idx + 1);
|
INT64 token = (INT64)z_quantize * MAXINT + (INT64)(idx + 1);
|
||||||
if (depth < depth_thres)
|
if (depth < depth_thres)
|
||||||
continue;
|
continue;
|
||||||
atomicMin((unsigned long long*)&zbuffer[pixel],(unsigned long long)token);
|
atomicMin(reinterpret_cast<unsigned long long*>(&zbuffer[pixel]),static_cast<unsigned long long>(token));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user