Detect Indirect Specular in Material When Not Using Path Tracing

With Path Tracing it is possible to use the PathTracingRayTypeSwitch node to detect if the material is rendered in a reflection pass or not.

This is very useful, but we couldn’t find any way to achieve this when not using Path Tracing.

- ReflectionCapturePassSwitch only works for baked reflections.

- RayTracingQualitySwitch only affects the hardware ray tracing pass in Lumen, which breaks the effect because of other reflections method in Lumen.

- The only method we found is PathTracingRayTypeSwitch, but it only works when using Path Tracing.

In past that was possible with the old deprecated RayTracing.

Does anyone know a way to do that now?

Thank you!

You can use the surface cache switch preprocessor in a custom node instead for software raytracing but ultimately the limiting factor for things like this with Lumen is always going to be screen traces, they will always pick up how it is displayed on screen.