Using hardware Instancing and Custom Shaders together

Hi @plasmalasgun,

There is no difference on how you enable hardware instancing on a standard material:

      // --- enable instancing on any material
      material.onUpdateShader = function (options) {
        options.useInstancing = true;
        return options;
      };
      material.update();

On that material you can override most shader chunks and write shader code that will affect each instance separately.

If you would like to introduce additional instancing parameters check this thread on how to do it:

2 Likes