mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge branch '3d' of https://github.com/jerrywwl/engine into 3d
This commit is contained in:
@@ -13,7 +13,7 @@ import { GFXRenderPass } from '../../gfx/render-pass';
|
||||
import { GFXSampler } from '../../gfx/sampler';
|
||||
import { GFXShader } from '../../gfx/shader';
|
||||
import { GFXTextureView } from '../../gfx/texture-view';
|
||||
import { RenderPassStage } from '../../pipeline/render-pipeline';
|
||||
import { RenderPassStage, UBOGlobal, UBOLocal } from '../../pipeline/render-pipeline';
|
||||
|
||||
export interface IPassInfoFull extends IPassInfo {
|
||||
// generated part
|
||||
@@ -53,6 +53,8 @@ const _type2default = {
|
||||
[GFXType.MAT4]: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
|
||||
};
|
||||
|
||||
const builtinRE = new RegExp(UBOGlobal.BLOCK.name + '|' + UBOLocal.BLOCK.name);
|
||||
|
||||
const btMask = 0xf0000000; // 4 bits, 16 slots
|
||||
const typeMask = 0x0fc00000; // 6 bits, 64 slots
|
||||
const bindingMask = 0x003ff800; // 11 bits, 2048 slots
|
||||
@@ -114,6 +116,9 @@ export class Pass {
|
||||
this.createPipelineState(info);
|
||||
|
||||
for (const u of info.blocks) {
|
||||
if (builtinRE.test(u.name)) {
|
||||
continue;
|
||||
}
|
||||
// create gfx buffer resource
|
||||
const buffer = device.createBuffer({
|
||||
memUsage: GFXMemoryUsageBit.HOST | GFXMemoryUsageBit.DEVICE,
|
||||
|
||||
@@ -23,7 +23,6 @@ export default class Model {
|
||||
|
||||
private _scene: RenderScene | null;
|
||||
private _id: number;
|
||||
private _enable: boolean;
|
||||
private _type: string;
|
||||
private _poolID: number;
|
||||
private _isEnable: boolean;
|
||||
@@ -48,7 +47,6 @@ export default class Model {
|
||||
constructor () {
|
||||
this._scene = null;
|
||||
this._id = 0;
|
||||
this._enable = false;
|
||||
|
||||
this._type = 'default';
|
||||
this._poolID = -1;
|
||||
|
||||
Reference in New Issue
Block a user