mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
missing sampler & circular ref issue (#4787)
* fix missing sampler issue * fix references
This commit is contained in:
committed by
Weiliang Wang
parent
a3ce76271f
commit
b995626f0c
@@ -26,8 +26,8 @@
|
||||
* @category model
|
||||
*/
|
||||
|
||||
import { Texture2D } from '../../assets';
|
||||
import { Filter, PixelFormat } from '../../assets/asset-enum';
|
||||
import { Texture2D } from '../../assets/texture-2d';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property } from '../../core/data/class-decorator';
|
||||
import { CCInteger, CCString } from '../../core/data/utils/attribute';
|
||||
import { Mat4, Vec2 } from '../../core/value-types';
|
||||
@@ -35,8 +35,8 @@ import { vec2 } from '../../core/vmath';
|
||||
import { GFXFormat } from '../../gfx/define';
|
||||
import { GFXAttributeName, GFXBufferTextureCopy, GFXFormatInfos } from '../../gfx/define';
|
||||
import { GFXDevice } from '../../gfx/device';
|
||||
import { Node } from '../../scene-graph';
|
||||
import { Mesh } from '../assets';
|
||||
import { Node } from '../../scene-graph/node';
|
||||
import { Mesh } from '../assets/mesh';
|
||||
import { Skeleton } from '../assets/skeleton';
|
||||
import { LCA, mapBuffer } from '../misc/utils';
|
||||
import { SkinningModelComponent } from './skinning-model-component';
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
* @category model
|
||||
*/
|
||||
|
||||
import { Texture2D } from '../../assets';
|
||||
import { Filter, PixelFormat } from '../../assets/asset-enum';
|
||||
import { Texture2D } from '../../assets/texture-2d';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property } from '../../core/data/class-decorator';
|
||||
import { CCString } from '../../core/data/utils/attribute';
|
||||
import { Mat4, Vec2 } from '../../core/value-types';
|
||||
@@ -36,9 +36,9 @@ import { GFXAttributeName, GFXBufferTextureCopy, GFXFormatInfos } from '../../gf
|
||||
import { GFXFormat, GFXType } from '../../gfx/define';
|
||||
import { GFXDevice } from '../../gfx/device';
|
||||
import { IGFXAttribute } from '../../gfx/input-assembler';
|
||||
import { Node } from '../../scene-graph';
|
||||
import { Material, Mesh } from '../assets';
|
||||
import { IMeshStruct } from '../assets/mesh';
|
||||
import { Node } from '../../scene-graph/node';
|
||||
import { Material } from '../assets/material';
|
||||
import { IMeshStruct, Mesh } from '../assets/mesh';
|
||||
import { Skeleton } from '../assets/skeleton';
|
||||
import { LCA, mapBuffer } from '../misc/utils';
|
||||
import { SkinningModelComponent } from './skinning-model-component';
|
||||
|
||||
@@ -12,7 +12,6 @@ import { builtinResMgr } from '../../../builtin';
|
||||
import RecyclePool from '../../../memop/recycle-pool';
|
||||
import { RenderMode, Space } from '../enum';
|
||||
import Particle from '../particle';
|
||||
import { ParticleSystemComponent } from '../particle-system-component';
|
||||
|
||||
const _tempAttribUV = new Vec3();
|
||||
const _tempAttribUV0 = new Vec2();
|
||||
@@ -213,7 +212,7 @@ export default class ParticleSystemRenderer {
|
||||
}
|
||||
|
||||
public onInit (ps: Component) {
|
||||
this.particleSystem = ps.node.getComponent(ParticleSystemComponent);
|
||||
this.particleSystem = ps.node.getComponent('cc.ParticleSystemComponent');
|
||||
this._particles = new RecyclePool(() => {
|
||||
return new Particle(this);
|
||||
}, 16);
|
||||
|
||||
@@ -38,7 +38,7 @@ import { lerp } from '../../../core/utils';
|
||||
import { Color, Vec3 } from '../../../core/value-types';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import * as math from '../../../core/vmath';
|
||||
import { Node } from '../../../scene-graph';
|
||||
import { Node } from '../../../scene-graph/node';
|
||||
import { SpriteComponent } from './sprite-component';
|
||||
import { UIRenderComponent } from './ui-render-component';
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import { ccclass, executeInEditMode, executionOrder, menu, property } from '../.
|
||||
import { EventTouch } from '../../../../core/platform';
|
||||
import { SystemEventType } from '../../../../core/platform/event-manager/event-enum';
|
||||
import { Color, Size } from '../../../../core/value-types';
|
||||
import { Node } from '../../../../scene-graph';
|
||||
import { Node } from '../../../../scene-graph/node';
|
||||
import { LabelComponent, VerticalTextAlignment } from '../label-component';
|
||||
import { SpriteComponent } from '../sprite-component';
|
||||
import { UIRenderComponent } from '../ui-render-component';
|
||||
|
||||
@@ -309,6 +309,7 @@ export class Model {
|
||||
pass.tryCompile(); // force update shaders
|
||||
pass.destroyPipelineState(psos[i]);
|
||||
psos[i] = this._doCreatePSO(pass);
|
||||
psos[i].pipelineLayout.layouts[0].update();
|
||||
}
|
||||
m.updateCommandBuffer();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ export class Skybox extends Model {
|
||||
set useIBL (val) {
|
||||
this._useIBL = val;
|
||||
const pipeline = this._scene.root.pipeline;
|
||||
if (!!pipeline.macros.CC_USE_IBL === val) { return; }
|
||||
pipeline.macros.CC_USE_IBL = val;
|
||||
this._scene.onPipelineChange();
|
||||
this._updateGlobalBinding();
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
*/
|
||||
|
||||
import { TextureCube } from '../3d/assets/texture-cube';
|
||||
import { CCBoolean, CCFloat } from '../core';
|
||||
import { ccclass, property } from '../core/data/class-decorator';
|
||||
import { CCBoolean, CCFloat } from '../core/data/utils/attribute';
|
||||
import { Color, Quat, Vec3 } from '../core/value-types';
|
||||
import { color4, vec3 } from '../core/vmath';
|
||||
import { Ambient } from '../renderer/scene/ambient';
|
||||
|
||||
Reference in New Issue
Block a user