<p dir="auto">The WebGLRenderer checks if an object intersects the cameras frustrum before it is allowed to render: <a href="https://github.com/mrdoob/three.js/blob/dev/src/renderers/WebGLRenderer.js#L1170-L1205">https://github.com/mrdoob/three.js/blob/dev/src/renderers/WebGLRenderer.js#L1170-L1205</a></p>
<p dir="auto">Could we have a simple flag on the object which tells us if was considered for rendering or not?</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (!object.frustumCulled || _frustum.intersectsObject(object)) {
  // ...
  object.didRender = true
} else {
  object.didRender = false
}"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">frustumCulled</span> <span class="pl-c1">||</span> <span class="pl-s1">_frustum</span><span class="pl-kos">.</span><span class="pl-en">intersectsObject</span><span class="pl-kos">(</span><span class="pl-s1">object</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-c">// ...</span>
  <span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">didRender</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
  <span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">didRender</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">This would allow us to quickly build virtualised primitives without the expense of running that check twice. For instance flexbox: <a href="https://github.com/pmndrs/react-three-flex">https://github.com/pmndrs/react-three-flex</a> We're running into problems with lots and lots of elements because calculating layout is expensive. But we could then just bail out on objects that aren't even shown, thereby virtualising it.</p>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">The idea is to cache camera frustum checks on objects (a) to avoid recalculation and (b) to offer a simple interface.</p>
<p dir="auto">As pointed out in <a href="https://stackoverflow.com/a/29424745" rel="nofollow">https://stackoverflow.com/a/29424745</a>, when <code class="notranslate">.frustumCulled</code> is enabled, <code class="notranslate">.inFrustum</code> could be populated as part of the frustum culling.</p>
<p dir="auto">I would be happy to put up a PR if there is interest in the feature.</p>