Trivial bug i guess?

First of all sorry for my poor english, since i’m not an English speaker.

I think i found a tiny bug in Optix 7 SDK sample code, named ‘optixPathTracer’.

In optixPathTracer.cu, emitted is added to result color in raygen program.

Closest-hit program always sets countEmitted as false, resulting emitted be always zero for next ray.

Problem is, in miss program, doesn’t modify emitted.

I think it Might causing strange result, like adding emitted twice to result color when ray goes closest hit, and missed.

So I think miss program should be like this.

Though i might be wrong since i’m an undergraduate student so i don’t have any theoretical background.

Anyway it doesn’t affect to final result at all.

2 Likes

Yes, that looks incorrect. I’ll file a bug report.

Setting the prd->emitted to the zero inside the miss program is one way to solve this.

You don’t see a difference because that will only happen when hitting the light and then miss because all other surfaces do not emit light, and the light.emission is brighter than 1.0 already which is clamped to 1.0 in the low dynamic range of the final display buffer. It should become visible when looking at the light in HDR or when making the light emit values less than 1.0.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.