mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge branch '3d' of https://github.com/jerrywwl/engine into 3d
This commit is contained in:
@@ -26,8 +26,8 @@ import { Asset } from '../../assets/asset';
|
||||
import { ccclass, property } from '../../core/data/class-decorator';
|
||||
import { GFXBindingType } from '../../gfx/define';
|
||||
import { Effect } from '../../renderer/core/effect';
|
||||
import { Pass, IPassOverrides } from '../../renderer/core/pass';
|
||||
import { EffectAsset, IPassInfo, ITechniqueInfo } from './effect-asset';
|
||||
import { IPassOverrides, Pass } from '../../renderer/core/pass';
|
||||
import { EffectAsset } from './effect-asset';
|
||||
|
||||
@ccclass('cc.Material')
|
||||
export class Material extends Asset {
|
||||
|
||||
@@ -396,7 +396,7 @@ export class Mesh extends Asset {
|
||||
* Gets the rendering mesh.
|
||||
*/
|
||||
public get renderingMesh () {
|
||||
this._lazyInitRenderResources();
|
||||
this._deferredInit();
|
||||
return this._renderingMesh;
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ export class Mesh extends Asset {
|
||||
return renderingSubmesh ? renderingSubmesh.inputAssembler : null;
|
||||
}
|
||||
|
||||
private _lazyInitRenderResources () {
|
||||
private _deferredInit () {
|
||||
if (this._initialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -259,8 +259,8 @@ export default class ModelComponent extends RenderableComponent {
|
||||
return;
|
||||
for (let i = 0; i < this._models.length; ++i) {
|
||||
let model = this._models[i];
|
||||
if (model._defines['_USE_SHADOW_MAP'] != undefined) {
|
||||
this.getMaterial(i).define('_USE_SHADOW_MAP', this._receiveShadows);
|
||||
if (model._defines['CC_USE_SHADOW_MAP'] != undefined) {
|
||||
this.getMaterial(i).define('CC_USE_SHADOW_MAP', this._receiveShadows);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,6 @@ export class Model {
|
||||
const subMesh = this._subMeshObject as IRenderingSubmesh;
|
||||
|
||||
pass.bindingLayout.bindBuffer(UBOLocal.BLOCK.binding, localUBO);
|
||||
pass.update();
|
||||
|
||||
const cmdBuff = this._cmdBuffers[index];
|
||||
cmdBuff.begin();
|
||||
|
||||
Reference in New Issue
Block a user