We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6987fb commit 5922b38Copy full SHA for 5922b38
1 file changed
include/nbl/builtin/hlsl/path_tracing/unidirectional.hlsl
@@ -173,8 +173,11 @@ struct Unidirectional
173
174
void missProgram(NBL_REF_ARG(ray_type) ray)
175
{
176
- vector3_type finalContribution = ray.getPayloadThroughput();
177
- finalContribution *= nee.get_environment_radiance(ray);
+ vector3_type finalContribution = nee.get_environment_radiance(ray);
+ typename nee_type::light_id_type env_light_id;
178
+ env_light_id.id = 0u;
179
+ const scalar_type pdf = nee.deferred_pdf(scene, env_light_id, ray);
180
+ finalContribution *= ray.foundEmissiveMIS(pdf * pdf);
181
ray.addPayloadContribution(finalContribution);
182
}
183
0 commit comments