Commit 1a052f0a authored by Romain Pacanowski's avatar Romain Pacanowski
Browse files

WIP. need to finish the importance sampling

parent 572d0250
......@@ -346,7 +346,7 @@ void brdf_eval_and_sample(float3 n, float3 in_dir, float3 & out_dir, float3 & br
//float3 bitangent = -onb.m_binormal;/// cross(tangent,n);
float3 bitangent = cross(tangent,n);
brdf_dot_nl_div_by_pdf = M_PIf* computeColorFromDirection(n, tangent, bitangent, -in_dir, out_dir);
brdf_dot_nl_div_by_pdf = M_PIf * computeColorFromDirection(n, tangent, bitangent, -in_dir, out_dir);
pdf = dot(n,out_dir) / M_PIf;
......@@ -418,5 +418,5 @@ void brdf_eval_and_sample(float3 n, float3 in_dir, float3 & out_dir, float3 & br
brdf_dot_nl_div_by_pdf = computeColorFromDirection(n, tangent, bitangent, -in_dir, out_dir) / pdf_out_dir;
#endif
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment