Skip to content
Snippets Groups Projects
Commit 04b04fe5 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix symmetry bug

parent 3c0151f1
No related branches found
No related tags found
1 merge request!358Updates to SDK and alternative fusion
......@@ -57,9 +57,13 @@ __device__ inline float biasedLength(const float3 &Xi, const float3 &X) {
if (x < 0 || y < 0 || x >= camera_origin.width || y >= camera_origin.height) return;
float3 nX = make_float3(normals_out[y*npitch_out+x]);
float3 aX = make_float3(centroid_out[y*cpitch_out+x]);
float contrib = contrib_out[y*wpitch_out+x];
//float3 nX = make_float3(normals_out[y*npitch_out+x]);
//float3 aX = make_float3(centroid_out[y*cpitch_out+x]);
//float contrib = contrib_out[y*wpitch_out+x];
float3 nX = make_float3(0.0f, 0.0f, 0.0f);
float3 aX = make_float3(0.0f, 0.0f, 0.0f);
float contrib = 0.0f;
float d0 = depth_origin[x+y*dpitch_o];
if (d0 <= camera_origin.minDepth || d0 >= camera_origin.maxDepth) return;
......@@ -166,9 +170,9 @@ __device__ inline float biasedLength(const float3 &Xi, const float3 &X) {
float l = 1.0f - sqrt(symx*symx+symy*symy);
l = l*l;
normals_out[y*npitch_out+x] = make_half4(nX*l, 0.0f);
centroid_out[y*cpitch_out+x] = make_float4(aX*l, 0.0f);
contrib_out[y*wpitch_out+x] = contrib*l;
normals_out[y*npitch_out+x] = make_half4(make_float3(normals_out[y*npitch_out+x]) + nX*l, 0.0f);
centroid_out[y*cpitch_out+x] = make_float4(make_float3(centroid_out[y*cpitch_out+x]) + aX*l, 0.0f);
contrib_out[y*wpitch_out+x] = contrib_out[y*wpitch_out+x] + contrib*l;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment