Skip to content

Commit

Permalink
lint #3
Browse files Browse the repository at this point in the history
  • Loading branch information
CraigFeldspar committed Dec 14, 2020
1 parent be8be5a commit 98d89f6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/Engines/Extensions/engine.multiRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ declare module "../../Engines/thinEngine" {
* when the frame buffer associated is the canvas frame buffer
*/
restoreSingleAttachment() : void;

/**
* Restores the webgl state to only draw on the main color attachment
* when the frame buffer associated is not the canvas frame buffer
Expand All @@ -80,7 +80,6 @@ ThinEngine.prototype.restoreSingleAttachment = function(): void {
this.bindAttachments([gl.BACK]);
};


ThinEngine.prototype.restoreSingleAttachmentForRenderTarget = function(): void {
const gl = this._gl;

Expand Down
2 changes: 1 addition & 1 deletion src/Engines/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ export class Engine extends ThinEngine {
postProcessInput = postProcess._forcedOutputTexture;
}
}

this._bindTexture(channel, postProcessInput, name);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Materials/Textures/multiRenderTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class MultiRenderTarget extends RenderTargetTexture {
var generateDepthTexture = options && options.generateDepthTexture ? options.generateDepthTexture : false;
var doNotChangeAspectRatio = !options || options.doNotChangeAspectRatio === undefined ? true : options.doNotChangeAspectRatio;
var drawOnlyOnFirstAttachmentByDefault = options && options.drawOnlyOnFirstAttachmentByDefault ? options.drawOnlyOnFirstAttachmentByDefault : false;
super(name, size, scene, generateMipMaps, doNotChangeAspectRatio,
super(name, size, scene, generateMipMaps, doNotChangeAspectRatio,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -199,7 +199,7 @@ export class MultiRenderTarget extends RenderTargetTexture {
if (this._count < 1) {
return;
}

this.releaseInternalTextures();
this._createInternalTextures();

Expand Down
2 changes: 1 addition & 1 deletion src/Materials/Textures/renderTargetTexture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ export class RenderTargetTexture extends Texture {
this.onAfterRenderObservable.notifyObservers(faceIndex);
});
}

/**
* @hidden
*/
Expand Down
7 changes: 3 additions & 4 deletions src/PostProcesses/postProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ export class PostProcess {

private _createRenderTargetTexture(textureSize: { width: number, height: number }, textureOptions: RenderTargetCreationOptions, channel = 0) {
for (let i = 0; i < this._textureCache.length; i++) {
if (this._textureCache[i].width === textureSize.width &&
if (this._textureCache[i].width === textureSize.width &&
this._textureCache[i].height === textureSize.height &&
this._textureCache[i]._postProcessChannel === channel) {
return this._textureCache[i];
Expand All @@ -506,7 +506,6 @@ export class PostProcess {
return tex;
}


private _flushTextureCache() {
const currentRenderId = this._renderId;

Expand Down Expand Up @@ -888,13 +887,13 @@ export class PostProcess {
return SerializationHelper.Parse(() => {
return new PostProcess(
parsedPostProcess.name,
parsedPostProcess.fragmentUrl,
parsedPostProcess.fragmentUrl,
parsedPostProcess.parameters,
parsedPostProcess.samplers,
parsedPostProcess.options,
targetCamera,
parsedPostProcess.renderTargetSamplingMode,
parsedPostProcess._engine,
parsedPostProcess._engine,
parsedPostProcess.reusable,
parsedPostProcess.defines,
parsedPostProcess.textureType,
Expand Down
5 changes: 0 additions & 5 deletions src/Rendering/prePassRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,18 +648,13 @@ export class PrePassRenderer {
enablePrePass = true;

this._setRenderTargetState(this.defaultRT, true);
// TODO : desactivate sss for render targets
// for (let j = 0; j < this.renderTargets.length; j++) {
// this._setRenderTargetState(this.renderTargets[j], true);
// }
}
}

let postProcesses;

for (let i = 0; i < this.renderTargets.length; i++) {
if (this.renderTargets[i].renderTargetTexture) {
if (this.renderTargets[i])
postProcesses = this._getPostProcessesSource(this.renderTargets[i]);
} else {
const camera = this._scene.activeCamera;
Expand Down

0 comments on commit 98d89f6

Please sign in to comment.