Skip to content

Commit

Permalink
Merge pull request #12146 from okrayum/voxel-jitter-cleanup
Browse files Browse the repository at this point in the history
cleanup: Remove VoxelPrimitive.jitter option (#11913)
  • Loading branch information
ankittrehan2000 authored Aug 26, 2024
2 parents e12391d + 28fe32f commit fd7eb81
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 33 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

##### Breaking Changes :mega:

- Removed `jitter` option from `VoxelPrimitive.js`, `VoxelRenderResources.js`, and related test code in `VoxelPrimitiveSpec.js`. [#11913](https://github.com/CesiumGS/cesium/issues/11913)

- Custom specular environment maps in `ImageBasedLighting` now require either a WebGL2 context or a WebGL1 context that supports the [`EXT_shader_texture_lod` extension](https://registry.khronos.org/webgl/extensions/EXT_shader_texture_lod/).

- `ScreenSpaceCameraController._zoomFactor` replaced with public zoomFactor attribute.
Expand Down
29 changes: 0 additions & 29 deletions packages/engine/Source/Scene/VoxelPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,6 @@ function VoxelPrimitive(options) {
this._transformNormalLocalToWorld = new Matrix3();

// Rendering
/**
* @type {boolean}
* @private
*/
this._jitter = false;

/**
* @type {boolean}
* @private
Expand Down Expand Up @@ -704,29 +698,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
},
},

/**
* Gets or sets whether or not to jitter the view ray during the raymarch.
* This reduces stair-step artifacts but introduces noise.
*
* @memberof VoxelPrimitive.prototype
* @type {boolean}
*/
jitter: {
get: function () {
return this._jitter;
},
set: function (jitter) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.bool("jitter", jitter);
//>>includeEnd('debug');

if (this._jitter !== jitter) {
this._jitter = jitter;
this._shaderDirty = true;
}
},
},

/**
* Gets or sets the nearest sampling.
*
Expand Down
3 changes: 0 additions & 3 deletions packages/engine/Source/Scene/VoxelRenderResources.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ function VoxelRenderResources(primitive) {
ShaderDestination.FRAGMENT
);
}
if (primitive._jitter) {
shaderBuilder.addDefine("JITTER", undefined, ShaderDestination.FRAGMENT);
}
if (primitive._nearestSampling) {
shaderBuilder.addDefine(
"NEAREST_SAMPLING",
Expand Down
1 change: 0 additions & 1 deletion packages/engine/Specs/Scene/VoxelPrimitiveSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ describe(
});

toggleOption("depthTest", true, false);
toggleOption("jitter", false, true);
toggleOption("nearestSampling", false, true);
});

Expand Down

0 comments on commit fd7eb81

Please sign in to comment.