Requesting improvements about planar reflections (4.12)

I recently made big optimization for planar reflections that does not have infinite size. In our use case there are multiple reflection actors per level but those are quite small in size.(example swim pool or mirror). So I made system that construct frustum pyramid using 4 corner points of reflection actor and reflection camera position. From these 5 points I make 4 frustum planes and I make additional frustum culling check for all static objects. This is huge win for cases where planar reflection actor is not infinite. especially for mobile where occlusion culling is not helping at all. I also check object screenspace distance and cull objects that are too small. These usually cull about 70-80% of objects.



struct FStaticObjectActor
{
    FVector pos;
    float   radius;
    AActor* actor;
};
 
void DynamicPlanarReflectionCulling(const TArray<FStaticObjectActor> objects, UPlanarReflectionComponent* p, FVector reflectionCamPos)
{
    p->HiddenActors.Reset();
 
    // Planar reflection is rectangle at z plane. Construct portal from reflection camera and 4 corner points.
    FVector min = p->Bounds.GetBox().Min;
    FVector max = p->Bounds.GetBox().Max;
    FVector corners[4] = { FVector(min.X, min.Y, max.Z), FVector(min.X, max.Y, max.Z), FVector(max.X, max.Y, max.Z), FVector(max.X, min.Y, max.Z) };
    FPlane planes[4] = { FPlane(corners[0], corners[1], reflectionCamPos), FPlane(corners[1], corners[2], reflectionCamPos), FPlane(corners[2], corners[3], reflectionCamPos), FPlane(corners[3], corners[0], reflectionCamPos)};
 
    for (const FStaticObjectActor& obj : objects)
    {
        // Hide objects that are outside of fitted frustum.
        if ((planes[0].PlaneDot(obj.pos) > obj.radius) || (planes[1].PlaneDot(obj.pos) > obj.radius) || (planes[2].PlaneDot(obj.pos) > obj.radius) || (planes[3].PlaneDot(obj.pos) > obj.radius))
        {
            p->HiddenActors.Add(obj.actor);
        }
        else
        {
            // Hide objects that are too small from reflection camera perspective.
            float d2 = FVector::DistSquared(reflectionCamPos, obj.pos);
            //if (obj.radius / sqrt(d2) < 0.05)) // unoptimized
            if (400.f * obj.radius * obj.radius < d2)
            {
                p->HiddenActors.Add(obj.actor);
            }
        }
    }
}


This is quite simple and fast method for making planar reflections usable for us. It would be nice to see this kind of system to be integrated to actual engine code because this is bit duplicate checking and could be do much more efficient and general way withing engine. I also noticed that engine does not cull objects behind planar reflection. This also should be done always. Maybe frustum near plane could be swapped to culling plane without any additional cost with bit more efficient culling.