|
@@ -1766,14 +1766,6 @@ const Compatibility = {
|
|
|
* @property {string} EITHER - Flat interpolation using either vertex.
|
|
* @property {string} EITHER - Flat interpolation using either vertex.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
-/**
|
|
|
|
|
- * Finds the minimum value in an array.
|
|
|
|
|
- *
|
|
|
|
|
- * @private
|
|
|
|
|
- * @param {Array<number>} array - The array to search for the minimum value.
|
|
|
|
|
- * @return {number} The minimum value in the array, or Infinity if the array is empty.
|
|
|
|
|
- */
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* Checks if an array contains values that require Uint32 representation.
|
|
* Checks if an array contains values that require Uint32 representation.
|
|
|
*
|
|
*
|
|
@@ -2118,6 +2110,25 @@ function probeAsync( gl, sync, interval ) {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * Used to select the correct depth functions
|
|
|
|
|
+ * when reversed depth buffer is used.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @type {Object}
|
|
|
|
|
+ */
|
|
|
|
|
+const ReversedDepthFuncs = {
|
|
|
|
|
+ [ NeverDepth ]: AlwaysDepth,
|
|
|
|
|
+ [ LessDepth ]: GreaterDepth,
|
|
|
|
|
+ [ EqualDepth ]: NotEqualDepth,
|
|
|
|
|
+ [ LessEqualDepth ]: GreaterEqualDepth,
|
|
|
|
|
+
|
|
|
|
|
+ [ AlwaysDepth ]: NeverDepth,
|
|
|
|
|
+ [ GreaterDepth ]: LessDepth,
|
|
|
|
|
+ [ NotEqualDepth ]: EqualDepth,
|
|
|
|
|
+ [ GreaterEqualDepth ]: LessEqualDepth,
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* This modules allows to dispatch event objects on custom JavaScript objects.
|
|
* This modules allows to dispatch event objects on custom JavaScript objects.
|
|
|
*
|
|
*
|
|
@@ -9144,10 +9155,6 @@ class RenderTarget extends EventDispatcher {
|
|
|
*/
|
|
*/
|
|
|
this.viewport = new Vector4( 0, 0, width, height );
|
|
this.viewport = new Vector4( 0, 0, width, height );
|
|
|
|
|
|
|
|
- const image = { width: width, height: height, depth: options.depth };
|
|
|
|
|
-
|
|
|
|
|
- const texture = new Texture( image );
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* An array of textures. Each color attachment is represented as a separate texture.
|
|
* An array of textures. Each color attachment is represented as a separate texture.
|
|
|
* Has at least a single entry for the default color attachment.
|
|
* Has at least a single entry for the default color attachment.
|
|
@@ -9156,6 +9163,9 @@ class RenderTarget extends EventDispatcher {
|
|
|
*/
|
|
*/
|
|
|
this.textures = [];
|
|
this.textures = [];
|
|
|
|
|
|
|
|
|
|
+ const image = { width: width, height: height, depth: options.depth };
|
|
|
|
|
+ const texture = new Texture( image );
|
|
|
|
|
+
|
|
|
const count = options.count;
|
|
const count = options.count;
|
|
|
for ( let i = 0; i < count; i ++ ) {
|
|
for ( let i = 0; i < count; i ++ ) {
|
|
|
|
|
|
|
@@ -45201,12 +45211,12 @@ class LightShadow {
|
|
|
_projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );
|
|
_projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );
|
|
|
this._frustum.setFromProjectionMatrix( _projScreenMatrix$1, shadowCamera.coordinateSystem, shadowCamera.reversedDepth );
|
|
this._frustum.setFromProjectionMatrix( _projScreenMatrix$1, shadowCamera.coordinateSystem, shadowCamera.reversedDepth );
|
|
|
|
|
|
|
|
- if ( shadowCamera.reversedDepth ) {
|
|
|
|
|
|
|
+ if ( shadowCamera.coordinateSystem === WebGPUCoordinateSystem || shadowCamera.reversedDepth ) {
|
|
|
|
|
|
|
|
shadowMatrix.set(
|
|
shadowMatrix.set(
|
|
|
0.5, 0.0, 0.0, 0.5,
|
|
0.5, 0.0, 0.0, 0.5,
|
|
|
0.0, 0.5, 0.0, 0.5,
|
|
0.0, 0.5, 0.0, 0.5,
|
|
|
- 0.0, 0.0, 1.0, 0.0,
|
|
|
|
|
|
|
+ 0.0, 0.0, 1.0, 0.0, // Identity Z (preserving the correct [0, 1] range from the projection matrix)
|
|
|
0.0, 0.0, 0.0, 1.0
|
|
0.0, 0.0, 0.0, 1.0
|
|
|
);
|
|
);
|
|
|
|
|
|
|
@@ -69061,18 +69071,6 @@ function WebGLShadowMap( renderer, objects, capabilities ) {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const reversedFuncs = {
|
|
|
|
|
- [ NeverDepth ]: AlwaysDepth,
|
|
|
|
|
- [ LessDepth ]: GreaterDepth,
|
|
|
|
|
- [ EqualDepth ]: NotEqualDepth,
|
|
|
|
|
- [ LessEqualDepth ]: GreaterEqualDepth,
|
|
|
|
|
-
|
|
|
|
|
- [ AlwaysDepth ]: NeverDepth,
|
|
|
|
|
- [ GreaterDepth ]: LessDepth,
|
|
|
|
|
- [ NotEqualDepth ]: EqualDepth,
|
|
|
|
|
- [ GreaterEqualDepth ]: LessEqualDepth,
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
function WebGLState( gl, extensions ) {
|
|
function WebGLState( gl, extensions ) {
|
|
|
|
|
|
|
|
function ColorBuffer() {
|
|
function ColorBuffer() {
|
|
@@ -69204,7 +69202,7 @@ function WebGLState( gl, extensions ) {
|
|
|
|
|
|
|
|
setFunc: function ( depthFunc ) {
|
|
setFunc: function ( depthFunc ) {
|
|
|
|
|
|
|
|
- if ( currentReversed ) depthFunc = reversedFuncs[ depthFunc ];
|
|
|
|
|
|
|
+ if ( currentReversed ) depthFunc = ReversedDepthFuncs[ depthFunc ];
|
|
|
|
|
|
|
|
if ( currentDepthFunc !== depthFunc ) {
|
|
if ( currentDepthFunc !== depthFunc ) {
|
|
|
|
|
|