<p dir="auto">With r111, WebGlRenderer begins checking for a position buffer attribute and uses its count in deciding whether to invoke the program. This introduced an arbitrary new requirement that BufferGeometry have a 'position' attribute. I suggest that the old behavior be followed, in which BufferGeometry.setDrawRange() is respected.</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/r111/src/renderers/WebGLRenderer.js">WebGLRenderer.js</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var position = geometry.attributes.position;
if ( index !== null &amp;&amp; index.count === 0 ) return;
if ( position === undefined || position.count === 0 ) return;"><pre class="notranslate"><code class="notranslate">var position = geometry.attributes.position;
if ( index !== null &amp;&amp; index.count === 0 ) return;
if ( position === undefined || position.count === 0 ) return;
</code></pre></div>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Rendering an InstancedBufferGeometry with no (used) attributes does not render.</p>
<p dir="auto">This happens when a shader uses only (implicit) gl_InstanceID and/or gl_VertexID,<br>
and user program establishes count with 'geom.maxInstancedCount = ...'<br>
(It only applies to WebGL2 as earlier shaders do not support this.)</p>
<p dir="auto">The internal value geometry._maxInstanceCount is never established, so<br>
var instanceCount = Math.min( geometry.instanceCount, geometry._maxInstanceCount );<br>
does not set a sensible value.</p>
<p dir="auto">A workaround is to set geometry._maxInstanceCount  in the user's program (eg to Infinity),<br>
but this is obviously not the correct solution.</p>
<h2 dir="auto"></h2>
<p dir="auto">With earlier versions of three.js (eg 109) a program could provide a 'dummy' attribute not actually used in the shader to establish count; but 117 is clever enough to realize this dummy is not used, and therefore does not take account of it in the count calculation.</p>
<h2 dir="auto"></h2>
<p dir="auto">example to follow</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Rel</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r117</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>