|
@@ -202,9 +202,6 @@
|
|
var defines = [];
|
|
var defines = [];
|
|
var attribs = [];
|
|
var attribs = [];
|
|
var fallbacks = new EffectFallbacks();
|
|
var fallbacks = new EffectFallbacks();
|
|
- if (useInstances) {
|
|
|
|
- defines.push("#define INSTANCES");
|
|
|
|
- }
|
|
|
|
|
|
|
|
for (var index = 0; index < this._options.defines.length; index++) {
|
|
for (var index = 0; index < this._options.defines.length; index++) {
|
|
defines.push(this._options.defines[index]);
|
|
defines.push(this._options.defines[index]);
|
|
@@ -219,6 +216,11 @@
|
|
defines.push("#define VERTEXCOLOR");
|
|
defines.push("#define VERTEXCOLOR");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (useInstances) {
|
|
|
|
+ defines.push("#define INSTANCES");
|
|
|
|
+ MaterialHelper.PrepareAttributesForInstances(attribs, defines);
|
|
|
|
+ }
|
|
|
|
+
|
|
// Bones
|
|
// Bones
|
|
if (mesh && mesh.useBones && mesh.computeBonesUsingShaders && mesh.skeleton) {
|
|
if (mesh && mesh.useBones && mesh.computeBonesUsingShaders && mesh.skeleton) {
|
|
attribs.push(VertexBuffer.MatricesIndicesKind);
|
|
attribs.push(VertexBuffer.MatricesIndicesKind);
|