<p dir="auto">I successfully created a ground foliage system using instanced buffer geometry. Setting up the instancing wasn’t nearly as bad as I though it would be, however one aspect was just downright tedious.</p>
<p dir="auto">What I’m referring to is recreating the Lambert shader manually and then adding in the custom orientation / position adjustments. This was necessary for the foliage material to respect scene lighting / shadows etc. Rebuilding the Lambert Material into a ShaderMaterial was not fun.</p>
<p dir="auto">Would it not be easier to have a few for example: ShaderChunks[‘Instancing’]? If I’m not overlooking anything, it would just require a few chunks, an instancing_pars chunk which could contain the instancing attributes and applyQuaternionToVector function (from three.js dev instancing examples), and one right after the ‘begin_vertex’ chunk to alter the vec3 transformed variable using the function.</p>
<p dir="auto">Would this not be much more user friendly? If a user wants to take advantage of instancing (who wouldn't), they simply have to set instancing: true on the material and of course set up the needed buffer attributes. They would no longer have to manually reconstruct an entire materials shader.</p>
<p dir="auto">I've seen more complex examples of trying to ease usage of instancing, perhaps we should start with something a little more simple like this?</p>
<p dir="auto">I’d be more than happy to make a PR, if this is desirable.</p>
<p dir="auto">Hello,</p>
<p dir="auto">i am interested in creating a HUD in webgl. I know html can be used to overlay over the scene, but having the UI accelerated on the card can have some mighty advantages, mostly integration with the rest of the app, 3D transforms/transparency and shader special effects.</p>
<p dir="auto">I was wondering if there was a way to dual render a scene and blend/overlay it. For example to render a a first time with a perspective camera, and then render a second HUD layer on top with an orthographic camera and blend it with the first.</p>
<p dir="auto">thanks</p>