<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Assigning <code class="notranslate">.skinning = true</code> doesn't work when the material is assigned to <code class="notranslate">scene.overrideMaterial</code>:</p>
<p dir="auto"><code class="notranslate">scene.overrideMaterial = new THREE.MeshPhysicalMaterial({skinning: true})</code></p>
<p dir="auto">The material and rendered image behave identically to as if <code class="notranslate">.skinning === false</code>.</p>
<h5 dir="auto">Three.js version</h5>
<ul dir="auto">
<li>[ x ] r118</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" checked=""> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Webkit</li>
</ul>
<p dir="auto">When setting the override material for a scene the maps and other settings on the original material are not used -- this applies to animations, mesh instances, and other uniforms and defines, as well. This jsfiddle shows that the normal map is not applied when rendering the scene with a <code class="notranslate">MeshNormalMaterial</code> applied:</p>
<p dir="auto"><a href="http://jsfiddle.net/wbhrd58c/" rel="nofollow">http://jsfiddle.net/wbhrd58c/</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/734200/43370791-4d63d1de-933a-11e8-80d2-7d1073bc2715.png"><img src="https://user-images.githubusercontent.com/734200/43370791-4d63d1de-933a-11e8-80d2-7d1073bc2715.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">This makes it a difficult to render things like normal and depth buffers for screen effects. So when an overrideMaterial is used the defines and uniforms of the original should be used (if they exist on the override material). This would let an override material us the color, displacementMap, normalMap, textures, skinning settings, etc available.</p>
<p dir="auto">This mechanic could be used make post processing passes more robust and correct, afford a depth prepass with correct vertex transformations, a deferred renderer that uses the original material properties without having to manually copy everything, and shadows that support displacement maps out of the box.</p>
<p dir="auto">This is closer to how Unity's <a href="https://docs.unity3d.com/Manual/SL-ShaderReplacement.html" rel="nofollow">Shader Replacement</a> works to afford this functionality:</p>
<blockquote>
<p dir="auto">the camera renders the scene as it normally would. the objects still use their materials, but the actual shader that ends up being used is changed</p>
</blockquote>
<p dir="auto">In Unity if the objects material doesn't define a specific uniform then the default shader uniform value is used. To allow for backwards compatibility this could be included as an opt-in feature:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Scene.setOverrideMaterial( material : Material, overrideUniforms : Boolean );"><pre class="notranslate"><span class="pl-v">Scene</span><span class="pl-kos">.</span><span class="pl-en">setOverrideMaterial</span><span class="pl-kos">(</span> <span class="pl-s1">material</span> : <span class="pl-v">Material</span><span class="pl-kos">,</span> <span class="pl-s1">overrideUniforms</span> : <span class="pl-v">Boolean</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>