How do I make pc.StandardMaterial to use a supplied shader? For example, the following will work fine wtih the base pc.Material:
var shader = new pc.Shader(device, shaderDefinition);
var material = new pc.Material();
material.shader = shader;
It will use the vertex and fragment shaders I feed it. However, I want to use pc.StandardMaterial, instead of its base class, so I can use the hardware instancing.
Unfortunately, it doesn’t work if I use the following:
var shader = new pc.Shader(device, shaderDefinition);
var material = new pc.StandardMaterial();
material.shader = shader;
material.update();
It doesn’t use the shader I give it. Instead, it uses a default one. What would be the correct way?
