Skip to content

How to determine if the intersection point falls on the emitter #1208

Answered by njroussel
ioissss asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ioissss

There's a method in the SurfaceInteraction3f struct for this: https://mitsuba.readthedocs.io/en/latest/src/api_reference.html#mitsuba.SurfaceInteraction3f.emitter2
You can then do mask = dr.eq(emitter, None) to get a boolean mask.

It takes in the scene as a parameter so that it can return the envrionment map if the ray didn't hit any surface.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ioissss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants