-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
At present, I want to add a scene to render together when rendering. I load two point cloud files and copy them to cuda together. However, the merged GS data cannot be rendered correctly and the color is very strange. I cannot render correctly after various tests. However, when I reduce my copy below to a single GS data, I can render correctly, do you have a better way?
`
count = P_array[0] * 2;
CUDA_SAFE_CALL_ALWAYS(cudaMalloc((void**)&pos_cuda, count * sizeof(Pos)));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(pos_cuda, pos_cuda_array[0], P_array[0] * sizeof(Pos), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(pos_cuda + P_array[0], pos_cuda_array[0], P_array[0] * sizeof(Pos), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMalloc((void**)&rot_cuda, count * sizeof(Rot)));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(rot_cuda, rot_cuda_array[0], P_array[0] * sizeof(Rot), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(rot_cuda + P_array[0], rot_cuda_array[0], P_array[0] * sizeof(Rot), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMalloc((void**)&scale_cuda, count * sizeof(Scale)));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(scale_cuda, scale_cuda_array[0], P_array[0] * sizeof(Scale), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(scale_cuda + P_array[0], scale_cuda_array[0], P_array[0] * sizeof(Scale), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMalloc((void**)&opacity_cuda, count * sizeof(float)));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(opacity_cuda, opacity_cuda_array[0], P_array[0] * sizeof(float), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(opacity_cuda + P_array[0], opacity_cuda_array[0], P_array[0] * sizeof(float), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMalloc((void**)&shs_cuda, count * sizeof(SHs<3>)));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(shs_cuda, shs_cuda_array[0], P_array[0] * sizeof(SHs<3>), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(shs_cuda + P_array[0], shs_cuda_array[0], P_array[0] * sizeof(SHs<3>), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMalloc((void**)&rect_cuda, 2 * count * sizeof(int)));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(rect_cuda, rect_cuda_array[0], 2 * P_array[0] * sizeof(int), cudaMemcpyDeviceToDevice));
CUDA_SAFE_CALL_ALWAYS(cudaMemcpy(rect_cuda + 2 * P_array[0], rect_cuda_array[0], 2 * P_array[0] * sizeof(int), cudaMemcpyDeviceToDevice));
`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels