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

Allow for slightly bad normals in reproject

parent 15a03573
No related branches found
No related tags found
2 merge requests!195Renderer improvements,!193Tweaks to improve reconstruct
......@@ -89,7 +89,9 @@ __global__ void reprojection_kernel(
const float3 n = transformR * make_float3(normals.tex2D((int)x, (int)y));
float3 ray = camera.screenToCam(screenPos.x, screenPos.y, 1.0f);
ray = ray / length(ray);
const float dotproduct = max(dot(ray,n),0.0f);
// Allow slightly beyond 90 degrees due to normal estimation errors
const float dotproduct = (max(dot(ray,n),-0.1f)+0.1) / 1.1f;
const float d2 = depth_src.tex2D(int(screenPos.x+0.5f), int(screenPos.y+0.5f));
const auto input = in.tex2D(screenPos.x, screenPos.y); //generateInput(in.tex2D((int)screenPos.x, (int)screenPos.y), params, worldPos);
......
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