You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It prevents custom vertex shader chunks to work with dynamic batching....since it re-overwrites them back to defaults!
if (dynamic) {
// Patch the material
material = material.clone();
material.chunks.transformVS = this.transformVS;
material.chunks.skinTexVS = this.skinTexVS;
material.chunks.skinConstVS = this.skinConstVS;
material.update();
}
why not: save the device boneLimit if needed....and then...
if (dynamic) {
// Patch the material
material = material.clone();
material.chunks.transformVS = boneLimit + "#define DYNAMICBATCH\n" + (material.chunks.transformVS ? material.chunks.transformVS : pc.shaderChunks.transformVS);// this.transformVS;
material.chunks.skinTexVS = (material.chunks.skinBatchTexVS ? material.chunks.skinBatchTexVS : pc.shaderChunks.skinBatchTexVS);
material.chunks.skinConstVS = (material.chunks.skinBatchConstVS ? material.chunks.skinBatchConstVS : pc.shaderChunks.skinBatchConstVS);
material.update();
}
That way, you check if there's any available custom implementations of those chunks before the batching occurs.
The tricky thing is he might assign Batch group within editor, and then sets material custom chunk later during a script.initialize() ...but he will need some way of informing the batch group to re-update, which can be tricky... Anyway of syncronising these aspects between custom vertex shader chunk settings and batching intialization? I see no way short of manually triggering the batching except by code or manual intiialization of batches by having batched entities within scene remain disabled first. Set custom vertex shader chunks first, then call batching manager to re-update. #
The text was updated successfully, but these errors were encountered:
The current batching.js has rather unnecessary
this
references to global pc.shaderChunks defaults.It prevents custom vertex shader chunks to work with dynamic batching....since it re-overwrites them back to defaults!
why not: save the device boneLimit if needed....and then...
That way, you check if there's any available custom implementations of those chunks before the batching occurs.
The tricky thing is he might assign Batch group within editor, and then sets material custom chunk later during a script.initialize() ...but he will need some way of informing the batch group to re-update, which can be tricky... Anyway of syncronising these aspects between custom vertex shader chunk settings and batching intialization? I see no way short of manually triggering the batching except by code or manual intiialization of batches by having batched entities within scene remain disabled first. Set custom vertex shader chunks first, then call batching manager to re-update. #
The text was updated successfully, but these errors were encountered: