Skip to content

Commit

Permalink
feat(troika-3d): reduce instancing batch size to 128
Browse files Browse the repository at this point in the history
Most uses of Instanceable3DFacade are going to be in the tens to 100s,
range, not the thousands, so reducing the batch size from 1024 to 128
gives a saner memory size for the instancing geometry attributes.
  • Loading branch information
lojjic committed Mar 26, 2020
1 parent c97a9f9 commit dc4bd8a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getShadersForMaterial, getShaderUniformTypes, expandShaderIncludes } fr

const { assign, assignIf } = utils

const INSTANCE_BATCH_SIZE = 1024 //TODO make this an option?
const INSTANCE_BATCH_SIZE = 128 //TODO make this an option?
const DYNAMIC_DRAW = 0x88E8 //can't import DynamicDrawUsage from three without breaking older versions

/**
Expand Down

0 comments on commit dc4bd8a

Please sign in to comment.