Skip to content
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
19 changes: 1 addition & 18 deletions src/core/Raycaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Matrix4 } from '../math/Matrix4.js';
import { Ray } from '../math/Ray.js';
import { Layers } from './Layers.js';
import { error } from '../utils.js';
import { WebGPUCoordinateSystem } from '../constants.js';

const _matrix = /*@__PURE__*/ new Matrix4();

Expand Down Expand Up @@ -127,23 +126,7 @@ class Raycaster {

} else if ( camera.isOrthographicCamera ) {

let coordsZ;

if ( camera.reversedDepth ) {

coordsZ = camera.far / ( camera.far - camera.near );

} else if ( camera.coordinateSystem === WebGPUCoordinateSystem ) {

coordsZ = camera.near / ( camera.near - camera.far );

} else {

coordsZ = ( camera.near + camera.far ) / ( camera.near - camera.far );

}

this.ray.origin.set( coords.x, coords.y, coordsZ ).unproject( camera ); // set origin in plane of camera
this.ray.origin.set( coords.x, coords.y, camera.projectionMatrix.elements[ 14 ] ).unproject( camera ); // set origin in plane of camera
this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );
this.camera = camera;

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/accessors/TextureNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ class TextureNode extends UniformNode {
/**
* Gathers four texels from the texture.
*
* @param {[Node<int>]} gatherNode - The index of the channel to read. This must be in range [0, 3] and a compile-time constant.
* @param {Node<int>} gatherNode - The index of the channel to read. This must be in range [0, 3] and a compile-time constant.
* @return {TextureNode} A texture node representing the texture sample.
*/
gather( gatherNode = 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/display/PassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class PassNode extends TempNode {
* A dictionary holding the internal result textures.
*
* @private
* @type {{ output: Texture, depth?: DepthTexture }}
* @type {{ output: Texture, depth: ?DepthTexture }}
*/
this._textures = {
output: renderTarget.texture
Expand Down
6 changes: 3 additions & 3 deletions src/nodes/math/ConditionalNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { warn } from '../../utils.js';
* Represents a logical `if/else` statement. Can be used as an alternative
* to the `If()`/`Else()` syntax.
*
* The corresponding TSL `select()` looks like so:
* The `select()` method is called in a chaining fashion on a condition. The parameter nodes of `select()`
* determine the outcome of the entire statement.
*
* ```js
* velocity = position.greaterThanEqual( limit ).select( velocity.negate(), velocity );
* ```
* The `select()` method is called in a chaining fashion on a condition. The parameter nodes of `select()`
* determine the outcome of the entire statement.
*
* @augments Node
*/
Expand Down