Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2a4675c
Optimize updates of SPS attributes
Popov72 Oct 27, 2021
efe4cc0
Fix ubo mesh being updated two times in some cases
Popov72 Oct 27, 2021
7c47bb0
"ignore" is not needed anymore in wgsl
Popov72 Oct 27, 2021
0806e73
Fix crash when using scene.executeWhenReady before starting
Popov72 Oct 28, 2021
d5c5c47
Mark defines from all draw wrappers as dirty
Popov72 Oct 28, 2021
d539b21
Fix crash in latest Chrome Canary
Popov72 Oct 28, 2021
5d5cf04
Add validation test for all procedural textures
Popov72 Oct 28, 2021
024ec17
Add resetDrawCache method where needed
Popov72 Oct 28, 2021
492dba2
Fix bundles being recreated in non compatibility mode
Popov72 Oct 28, 2021
5ad7418
Add missing dispose calls
Popov72 Oct 29, 2021
391b120
Make sure no bundles are created each frame in the non compatibility …
Popov72 Oct 29, 2021
4365aaa
Fix validation tests for the non compatibility mode
Popov72 Oct 29, 2021
e0f0c78
Merge branch 'master' of https://github.com/BabylonJS/Babylon.js into…
Popov72 Oct 29, 2021
6ed38d7
Fix unncessary bundle recreations in the non compatibility mode in th…
Popov72 Oct 29, 2021
d5f51a3
Fix crash when changing the settings of GBR in WebGPU
Popov72 Oct 29, 2021
b50474d
Fix usage of draw wrapper
Popov72 Oct 29, 2021
3736de4
Fix updating the previousMatrix buffer
Popov72 Oct 29, 2021
1f9ccf4
Fix validation tests to avoid bundle recreations when in non compatib…
Popov72 Oct 29, 2021
93d4ccb
Fix crash of the shadow depth wrapper test
Popov72 Oct 29, 2021
5200bc9
More fixing for the non compatibility mode
Popov72 Oct 29, 2021
dc37d94
Fix occlusion queries after latest changes with DrawWrappers
Popov72 Nov 2, 2021
07ff3c4
Merge branch 'master' of https://github.com/BabylonJS/Babylon.js into…
Popov72 Nov 2, 2021
fc99797
Fix cloud material for WebGL1
Popov72 Nov 2, 2021
0404dbf
Avoid casting to any
Popov72 Nov 2, 2021
8dc8e7c
Add setMaterialForRendering to EffectLayer
Popov72 Nov 2, 2021
212acaa
Exclude PG that does not work on Azure
Popov72 Nov 2, 2021
d8ca325
Move supportRenderPasses to engine._features
Popov72 Nov 3, 2021
26b5c4c
Fix crash when setting supportRenderPasses
Popov72 Nov 3, 2021
e4d0b70
Use a specific render pass id for the occlusion query
Popov72 Nov 3, 2021
c5afe7d
Add validation test for using custom material with depth renderer
Popov72 Nov 3, 2021
2f33bf3
Rollback _meshesUsingTheirOwnMaterials in glow layer for backward com…
Popov72 Nov 3, 2021
b62aacc
Misc fixes
Popov72 Nov 3, 2021
95d21d3
linting
Popov72 Nov 3, 2021
f935087
linting (2)
Popov72 Nov 3, 2021
aa8dc29
Merge branch 'master' of https://github.com/BabylonJS/Babylon.js into…
Popov72 Nov 3, 2021
e9ec01f
Add doc
Popov72 Nov 3, 2021
31a1f40
Fix validation tests
Popov72 Nov 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions loaders/src/glTF/2.0/Extensions/KHR_materials_transmission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ class TransmissionHelper {
} else {
opaqueRenderTarget.clearColor.copyFrom(this._options.clearColor);
}
this._scene.imageProcessingConfiguration.applyByPostProcess = true;
// we do not use the applyByPostProcess setter to avoid flagging all the materials as "image processing dirty"!
this._scene.imageProcessingConfiguration._applyByPostProcess = true;
});
this._opaqueRenderTarget.onAfterUnbindObservable.add(() => {
this._scene.environmentIntensity = saveSceneEnvIntensity;
this._scene.imageProcessingConfiguration.applyByPostProcess = sceneImageProcessingapplyByPostProcess;
this._scene.imageProcessingConfiguration._applyByPostProcess = sceneImageProcessingapplyByPostProcess;
});

this._transparentMeshesCache.forEach((mesh: AbstractMesh) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ float noise(vec2 n) {

float fbm(vec2 n) {
float total = 0.0, ampl = amplitude;
#ifdef WEBGL2
for (int i = 0; i < numOctaves; i++) {
#else
for (int i = 0; i < 4; i++) {
#endif
total += noise(n) * ampl;
n += n;
ampl *= 0.5;
Expand Down
8 changes: 8 additions & 0 deletions src/Culling/boundingBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ export class BoundingBox implements ICullable {
return true;
}

/**
* Disposes the resources of the class
*/
public dispose(): void {
this._drawWrapperFront?.dispose();
this._drawWrapperBack?.dispose();
}

// Statics

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Engines/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ export class Engine extends ThinEngine {
return;
}

this._features.supportRenderPasses = true;

options = this._creationOptions;

if ((<any>canvasOrContext).getContext) {
Expand Down
3 changes: 3 additions & 0 deletions src/Engines/engineFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export interface EngineFeatures {
/** Indicates that even if we don't have to update the properties of a uniform buffer (because of some optimzations in the material) we still need to bind the uniform buffer themselves */
needToAlwaysBindUniformBuffers: boolean;

/** Indicates that the engine supports render passes */
supportRenderPasses: boolean;

/** @hidden */
_collectUbosUpdatedInFrame: boolean;
}
1 change: 1 addition & 0 deletions src/Engines/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export * from "./WebGPU/webgpuCacheRenderPipeline";
export * from "./WebGPU/webgpuCacheRenderPipelineTree";
export * from "./WebGPU/webgpuCacheBindGroups";
export * from "./WebGPU/webgpuCacheSampler";
export * from "./WebGPU/webgpuDrawContext";
export * from "./WebGPU/webgpuTintWASM";
export * from "./WebGL/webGL2ShaderProcessors";
export * from "./nativeEngine";
Expand Down
1 change: 1 addition & 0 deletions src/Engines/nativeEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ export class NativeEngine extends Engine {
useUBOBindingCache: true,
needShaderCodeInlining: true,
needToAlwaysBindUniformBuffers: false,
supportRenderPasses: true,
_collectUbosUpdatedInFrame: false,
};

Expand Down
1 change: 1 addition & 0 deletions src/Engines/nullEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export class NullEngine extends Engine {
useUBOBindingCache: false,
needShaderCodeInlining: false,
needToAlwaysBindUniformBuffers: false,
supportRenderPasses: true,
_collectUbosUpdatedInFrame: false,
};

Expand Down
1 change: 1 addition & 0 deletions src/Engines/thinEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,7 @@ export class ThinEngine {
useUBOBindingCache: true,
needShaderCodeInlining: false,
needToAlwaysBindUniformBuffers: false,
supportRenderPasses: false,
_collectUbosUpdatedInFrame: false,
};
}
Expand Down
4 changes: 3 additions & 1 deletion src/Engines/webgpuEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ export class WebGPUEngine extends Engine {
useUBOBindingCache: false,
needShaderCodeInlining: true,
needToAlwaysBindUniformBuffers: true,
supportRenderPasses: true,
_collectUbosUpdatedInFrame: false,
};
}
Expand Down Expand Up @@ -1699,7 +1700,8 @@ export class WebGPUEngine extends Engine {
}
} else if (!effect.effect || effect.effect === this._currentEffect && effect.materialContext === this._currentMaterialContext && effect.drawContext === this._currentDrawContext && !this._forceEnableEffect) {
if (!effect.effect && this.dbgShowEmptyEnableEffectCalls) {
console.warn("Invalid call to enableEffect: the effect property is empty! drawWrapper=", effect);
console.error("drawWrapper=", effect);
throw "Invalid call to enableEffect: the effect property is empty!";
}
return;
} else {
Expand Down
Loading