mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
fix ubo aligned (#5010)
* modified some interfaces * fix conflicts * fix ubo aligned
This commit is contained in:
+15
-15
File diff suppressed because one or more lines are too long
@@ -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 },
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user