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

Minor edit to ignore bad points

parent c34a571a
No related branches found
No related tags found
2 merge requests!116Implements #133 point alignment,!114Ongoing #133 improvements
Pipeline #14607 passed
This commit is part of merge request !116. Comments created here will be created in the context of that merge request.
...@@ -142,13 +142,19 @@ __global__ void move_points_kernel( ...@@ -142,13 +142,19 @@ __global__ void move_points_kernel(
if (x < p.width() && y < p.height()) { if (x < p.width() && y < p.height()) {
const float4 world = p(x,y); const float4 world = p(x,y);
float4 vec = ev.tex2D((int)x,(int)y); if (world.x == MINF) return;
float contrib = vec.w;
float4 vec = make_float4(0.0f, 0.0f, 0.0f, 0.0f); //ev.tex2D((int)x,(int)y);
float contrib = 0.0f;
// Calculate screen space distortion with neighbours // Calculate screen space distortion with neighbours
for (int v=-MOTION_RADIUS; v<=MOTION_RADIUS; ++v) { for (int v=-MOTION_RADIUS; v<=MOTION_RADIUS; ++v) {
for (int u=-MOTION_RADIUS; u<=MOTION_RADIUS; ++u) { for (int u=-MOTION_RADIUS; u<=MOTION_RADIUS; ++u) {
const float4 vecn = ev.tex2D((int)x+u,(int)y+v); const float4 vecn = ev.tex2D((int)x+u,(int)y+v);
//const float3 pn = make_float3(p.tex2D((int)x+u,(int)y+v));
//if (pn.x == MINF) continue;
//const float s = ftl::cuda::spatialWeighting(pn, make_float3(world), 0.04f);
contrib += vecn.w; contrib += vecn.w;
vec += vecn.w * vecn; vec += vecn.w * vecn;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment