This dummy code doesn't trace back reflections from an AiStandardSurface shader (on the right) if caustics are not enabled in the material. The problem is of course that as soon as caustics are enabled a lot of fireflies just start appearing.
However an AiStandardSurface traces back reflections from another AiStandardSurface even without caustics enabled. So, - how can we get reflections while tracing an AiStandardSurface without caustics enabled ? Thanks !
AtScrSample scrs; scrs.color = 0.f; if(sg->Rt != AI_RAY_DIFFUSE_REFLECT) { AtVector rdir= AiReflect(sg->Rd, sg->Nf); AtRay wi_ray= AiMakeRay(AI_RAY_ALL_REFLECT, sg->P, &rdir, AI_BIG, sg); if( !AiTrace(wi_ray, AI_RGB_WHITE, scrs)) AiTraceBackground(wi_ray, scrs); } sg->out.RGB() = scrs.color;