Skip to content

Commit 73f7b96

Browse files
wrong normal was output to AOV
1 parent dfc1762 commit 73f7b96

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

include/nbl/builtin/glsl/material_compiler/common.glsl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,6 @@ nbl_glsl_MC_eval_pdf_aov_t nbl_glsl_MC_instr_bxdf_eval_and_pdf_common(
746746
in uint op, in bool is_not_brdf,
747747
in nbl_glsl_MC_params_t params,
748748
in mat2x3 ior, in mat2x3 ior2,
749-
#if GEN_CHOICE_STREAM>=GEN_CHOICE_WITH_AOV_EXTRACTION
750-
in vec3 normal,
751-
#endif
752749
in float absOrMaxNdotV,
753750
in float absOrMaxNdotL,
754751
in nbl_glsl_LightSample s,
@@ -775,7 +772,7 @@ nbl_glsl_MC_eval_pdf_aov_t nbl_glsl_MC_instr_bxdf_eval_and_pdf_common(
775772
const float a = nbl_glsl_MC_params_getAlpha(params);
776773
const float a2 = a*a;
777774
#if GEN_CHOICE_STREAM>=GEN_CHOICE_WITH_AOV_EXTRACTION
778-
result.aov.normal = normal;
775+
result.aov.normal = currInteraction.inner.isotropic.N;
779776
#endif
780777

781778
#if defined(OP_DIFFUSE) || defined(OP_DIFFTRANS)
@@ -961,9 +958,6 @@ void nbl_glsl_MC_instr_eval_and_pdf_execute(
961958
{
962959
result = nbl_glsl_MC_instr_bxdf_eval_and_pdf_common(
963960
instr,op,is_not_brdf,params,ior,ior2,
964-
#if GEN_CHOICE_STREAM>=GEN_CHOICE_WITH_AOV_EXTRACTION
965-
precomp.N,
966-
#endif
967961
NdotV,NdotL,
968962
s,microfacet,run
969963
);
@@ -1235,7 +1229,7 @@ nbl_glsl_LightSample nbl_bsdf_cos_generate(
12351229
const float ax = nbl_glsl_MC_params_getAlpha(params);
12361230
const float ax2 = ax*ax;
12371231
#if GEN_CHOICE_STREAM>=GEN_CHOICE_WITH_AOV_EXTRACTION
1238-
out_values.aov.normal = precomp.N;
1232+
out_values.aov.normal = currInteraction.inner.isotropic.N;
12391233
#endif
12401234

12411235
// TODO: refactor

0 commit comments

Comments
 (0)