fix ubo aligned (#5010)

* modified some interfaces

* fix conflicts

* fix ubo aligned
This commit is contained in:
Weiliang Wang
2019-07-30 14:36:06 +08:00
committed by GitHub
parent a81e7269d2
commit 4a4f8db385
3 changed files with 18 additions and 18 deletions
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -241,13 +241,13 @@ export const JointUniformCapacity = 30;
export class UBOSkinningTexture {
public static JOINTS_TEXTURE_INFO_OFFSET: number = 0;
public static JOINTS_FRAME_ID_OFFSET: number = UBOSkinningTexture.JOINTS_TEXTURE_INFO_OFFSET + 4;
public static COUNT: number = UBOSkinningTexture.JOINTS_FRAME_ID_OFFSET + 1;
public static COUNT: number = UBOSkinningTexture.JOINTS_FRAME_ID_OFFSET + 4;
public static SIZE: number = UBOSkinningTexture.COUNT * 4;
public static BLOCK: GFXUniformBlock = {
binding: UniformBinding.UBO_SKINNING_TEXTURE, name: 'CCSkinningTexture', members: [
{ name: 'cc_jointsTextureInfo', type: GFXType.FLOAT4, count: 1 },
{ name: 'cc_jointsFrameID', type: GFXType.FLOAT, count: 1 },
{ name: 'cc_jointsFrameID', type: GFXType.FLOAT4, count: 1 },
],
};
}
+1 -1
View File
@@ -60,7 +60,7 @@ export class SkinningModel extends Model {
constructor (scene: RenderScene, node: INode) {
super(scene, node);
this._type = 'skinning';
const jointsTextureInfo = new Float32Array(5);
const jointsTextureInfo = new Float32Array(8);
const frameID = new Float32Array(1);
const texture = this._scene.texturePool.getDefaultJointsTexture();
this._jointsMedium = { buffer: null, jointsTextureInfo, frameID, texture };