Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct spelling in IBL Shadows Pipeline #15807

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ export class _IblShadowsAccumulationPass {
* A value that controls how much of the previous frame's accumulation to keep.
* The higher the value, the faster the shadows accumulate but the more potential ghosting you'll see.
*/
public get remenance(): number {
return this._remenance;
public get remanence(): number {
Popov72 marked this conversation as resolved.
Show resolved Hide resolved
return this._remanence;
}

/**
* A value that controls how much of the previous frame's accumulation to keep.
* The higher the value, the faster the shadows accumulate but the more potential ghosting you'll see.
*/
public set remenance(value: number) {
this._remenance = value;
public set remanence(value: number) {
this._remanence = value;
}
private _remenance: number = 0.9;
private _remanence: number = 0.9;

/**
* Reset the accumulation.
Expand Down Expand Up @@ -285,8 +285,8 @@ export class _IblShadowsAccumulationPass {
}

private _setOutputTextureBindings() {
const remenance = this._isMoving ? this.remenance : 0.99;
this._accumulationParams.set(remenance, this.reset ? 1.0 : 0.0, this._renderPipeline.voxelGridSize, 0.0);
const remanence = this._isMoving ? this.remanence : 0.99;
this._accumulationParams.set(remanence, this.reset ? 1.0 : 0.0, this._renderPipeline.voxelGridSize, 0.0);
this._outputTexture.setTexture("spatialBlurSampler", this._renderPipeline._getSpatialBlurTexture());
this._outputTexture.setVector4("accumulationParameters", this._accumulationParams);
this._outputTexture.setTexture("oldAccumulationSampler", this._oldAccumulationCopy ? this._oldAccumulationCopy : this._renderPipeline._dummyTexture2d);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ interface IblShadowsSettings {
* A factor that controls how long the shadows remain in the scene.
* 0.0 is no persistence, 1.0 is full persistence.
* This value applies only while the camera is moving. Once stationary, the pipeline
* increases remenance automatically to help the shadows converge.
* increases remanence automatically to help the shadows converge.
*/
shadowRemenance?: number;
shadowRemanence?: number;

/**
* Render the voxel grid from 3 different axis. This will result in better quality shadows with fewer
Expand Down Expand Up @@ -159,7 +159,7 @@ export class IblShadowsRenderPipeline extends PostProcessRenderPipeline {
public voxelGridSize: number = 1.0;

/**
* Reset the shadow accumulation. This has a similar affect to lowering the remenance for a single frame.
* Reset the shadow accumulation. This has a similar affect to lowering the remanence for a single frame.
* This is useful when making a sudden change to the IBL.
*/
public resetAccumulation(): void {
Expand Down Expand Up @@ -616,16 +616,16 @@ export class IblShadowsRenderPipeline extends PostProcessRenderPipeline {
/**
* The decree to which the shadows persist between frames. 0.0 is no persistence, 1.0 is full persistence.
**/
public get shadowRemenance(): number {
return this._accumulationPass?.remenance;
public get shadowRemanence(): number {
return this._accumulationPass?.remanence;
}

/**
* The decree to which the shadows persist between frames. 0.0 is no persistence, 1.0 is full persistence.
**/
public set shadowRemenance(value: number) {
public set shadowRemanence(value: number) {
if (!this._accumulationPass) return;
this._accumulationPass.remenance = value;
this._accumulationPass.remanence = value;
}

/**
Expand Down Expand Up @@ -812,7 +812,7 @@ export class IblShadowsRenderPipeline extends PostProcessRenderPipeline {
this.ssShadowSampleCount = options.ssShadowSampleCount || 16;
this.ssShadowStride = options.ssShadowStride || 8;
this.ssShadowThicknessScale = options.ssShadowThicknessScale || 1.0;
this.shadowRemenance = options.shadowRemenance ?? 0.75;
this.shadowRemanence = options.shadowRemanence ?? 0.75;
this._noiseTexture = new Texture("https://assets.babylonjs.com/textures/blue_noise/blue_noise_rgb.png", this.scene, false, true, Constants.TEXTURE_NEAREST_SAMPLINGMODE);
if (this.scene.environmentTexture) {
this._importanceSamplingRenderer.iblSource = this.scene.environmentTexture;
Expand Down
6 changes: 3 additions & 3 deletions packages/tools/tests/test/visualization/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@
},
{
"title": "IBL Voxel Shadowing",
"playgroundId": "#8R5SSE#369",
"playgroundId": "#8R5SSE#408",
"referenceImage": "voxelShadows.png",
"renderCount": 15,
"excludedEngines": ["webgl1"]
Expand All @@ -2258,14 +2258,14 @@
},
{
"title": "IBL Voxel Shadowing Right-Handed",
"playgroundId": "#8R5SSE#377",
"playgroundId": "#8R5SSE#409",
"referenceImage": "voxelShadowsRightHanded.png",
"renderCount": 15,
"excludedEngines": ["webgl1"]
},
{
"title": "IBL Voxel Shadowing Left-Handed",
"playgroundId": "#8R5SSE#378",
"playgroundId": "#8R5SSE#410",
"referenceImage": "voxelShadowsLeftHanded.png",
"renderCount": 15,
"excludedEngines": ["webgl1"]
Expand Down