mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 19:12:40 +08:00
increase default joint texture size (#5876)
This commit is contained in:
@@ -108,7 +108,7 @@ function uploadJointDataDQS (out: Float32Array, base: number, mat: Mat4, firstBo
|
||||
}
|
||||
|
||||
function roundUpTextureSize (targetLength: number, formatSize: number) {
|
||||
const minSize = 204;
|
||||
const minSize = 480; // have to be multiples of 12
|
||||
const formatScale = 4 / Math.sqrt(formatSize);
|
||||
return Math.ceil(Math.max(minSize * formatScale, targetLength) / 12) * 12;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export class SkinningModel extends Model {
|
||||
if (!skeleton || !skinningRoot || !mesh) { return; }
|
||||
this._transform = skinningRoot;
|
||||
this._jointsMedium.animInfo = this._dataPoolManager.jointsAnimationInfo.get(skinningRoot.uuid);
|
||||
if (!this._jointsMedium.buffer) {
|
||||
if (!this._jointsMedium.buffer) { // create buffer here so re-init after destroy could work
|
||||
this._jointsMedium.buffer = this._device.createBuffer({
|
||||
usage: GFXBufferUsageBit.UNIFORM | GFXBufferUsageBit.TRANSFER_DST,
|
||||
memUsage: GFXMemoryUsageBit.HOST | GFXMemoryUsageBit.DEVICE,
|
||||
|
||||
Reference in New Issue
Block a user