More than 1 miss program?

If, say, I have a scene with a model, a floor and an environment map. I want the model to reflect the environment map, but i don’t want the floor to reflect it. How can I do this, as I can only set 1 miss program on the context?

Thanks

First, miss programs are per ray type, not per context, so there can be multiple miss programs.

For your case one is enough and all you would need to do is to add a flag to your per-ray data payload if you want the miss program to behave one or another way.
If you hit the floor, let its closest_hit program set the flag that you don’t want to see the miss result and let the miss program evaluate that flag accordingly and return black.

Awesome :-)

Thank you for the quick reply, I really appreciate it.