|
@@ -941,6 +941,7 @@
|
|
public _cachedVisibility: Nullable<number>;
|
|
public _cachedVisibility: Nullable<number>;
|
|
|
|
|
|
private _renderId = 0;
|
|
private _renderId = 0;
|
|
|
|
+ private _frameId = 0;
|
|
private _executeWhenReadyTimeoutId = -1;
|
|
private _executeWhenReadyTimeoutId = -1;
|
|
private _intermediateRendering = false;
|
|
private _intermediateRendering = false;
|
|
|
|
|
|
@@ -1488,13 +1489,21 @@
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Gets an unique Id for the current frame
|
|
|
|
|
|
+ * Gets an unique Id for the current render phase
|
|
* @returns a number
|
|
* @returns a number
|
|
*/
|
|
*/
|
|
public getRenderId(): number {
|
|
public getRenderId(): number {
|
|
return this._renderId;
|
|
return this._renderId;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Gets an unique Id for the current frame
|
|
|
|
+ * @returns a number
|
|
|
|
+ */
|
|
|
|
+ public getFrameId(): number {
|
|
|
|
+ return this._frameId;
|
|
|
|
+ }
|
|
|
|
+
|
|
/** Call this function if you want to manually increment the render Id*/
|
|
/** Call this function if you want to manually increment the render Id*/
|
|
public incrementRenderId(): void {
|
|
public incrementRenderId(): void {
|
|
this._renderId++;
|
|
this._renderId++;
|
|
@@ -3949,7 +3958,7 @@
|
|
const material = subMesh.getMaterial();
|
|
const material = subMesh.getMaterial();
|
|
if (material !== null && material !== undefined) {
|
|
if (material !== null && material !== undefined) {
|
|
// Render targets
|
|
// Render targets
|
|
- if (material.getRenderTargetTextures !== undefined) {
|
|
|
|
|
|
+ if (material.hasRenderTargetTextures && material.getRenderTargetTextures !== undefined) {
|
|
if (this._processedMaterials.indexOf(material) === -1) {
|
|
if (this._processedMaterials.indexOf(material) === -1) {
|
|
this._processedMaterials.push(material);
|
|
this._processedMaterials.push(material);
|
|
|
|
|
|
@@ -4378,6 +4387,8 @@
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ this._frameId++;
|
|
|
|
+
|
|
// Register components that have been associated lately to the scene.
|
|
// Register components that have been associated lately to the scene.
|
|
this._registerTransientComponents();
|
|
this._registerTransientComponents();
|
|
|
|
|