@needle-tools/three 0.162.5 → 0.162.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.cjs +1220 -1214
- package/build/three.module.js +804 -798
- package/build/three.module.min.js +6 -6
- package/package.json +1 -1
- package/src/renderers/webxr/WebXRManager.js +15 -9
package/build/three.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2010-2023 Three.js Authors
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2010-2023 Three.js Authors
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
8
|
const REVISION = '162';
|
|
9
9
|
|
|
10
10
|
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
|
|
@@ -221,8 +221,8 @@ const GLSL3 = '300 es';
|
|
|
221
221
|
const _SRGBAFormat = 1035; // fallback for WebGL 1
|
|
222
222
|
|
|
223
223
|
const WebGLCoordinateSystem = 2000;
|
|
224
|
-
const WebGPUCoordinateSystem = 2001;
|
|
225
|
-
|
|
224
|
+
const WebGPUCoordinateSystem = 2001;
|
|
225
|
+
|
|
226
226
|
/**
|
|
227
227
|
* https://github.com/mrdoob/eventdispatcher.js/
|
|
228
228
|
*/
|
|
@@ -306,8 +306,8 @@ class EventDispatcher {
|
|
|
306
306
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
}
|
|
310
|
-
|
|
309
|
+
}
|
|
310
|
+
|
|
311
311
|
const _lut = [ '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '0a', '0b', '0c', '0d', '0e', '0f', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '1a', '1b', '1c', '1d', '1e', '1f', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '2a', '2b', '2c', '2d', '2e', '2f', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '3a', '3b', '3c', '3d', '3e', '3f', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '4a', '4b', '4c', '4d', '4e', '4f', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '5a', '5b', '5c', '5d', '5e', '5f', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '6a', '6b', '6c', '6d', '6e', '6f', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '7a', '7b', '7c', '7d', '7e', '7f', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '8a', '8b', '8c', '8d', '8e', '8f', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '9a', '9b', '9c', '9d', '9e', '9f', 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'aa', 'ab', 'ac', 'ad', 'ae', 'af', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'ba', 'bb', 'bc', 'bd', 'be', 'bf', 'c0', 'c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'ca', 'cb', 'cc', 'cd', 'ce', 'cf', 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'da', 'db', 'dc', 'dd', 'de', 'df', 'e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6', 'e7', 'e8', 'e9', 'ea', 'eb', 'ec', 'ed', 'ee', 'ef', 'f0', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'fa', 'fb', 'fc', 'fd', 'fe', 'ff' ];
|
|
312
312
|
|
|
313
313
|
let _seed = 1234567;
|
|
@@ -642,8 +642,8 @@ const MathUtils = {
|
|
|
642
642
|
setQuaternionFromProperEuler: setQuaternionFromProperEuler,
|
|
643
643
|
normalize: normalize,
|
|
644
644
|
denormalize: denormalize
|
|
645
|
-
};
|
|
646
|
-
|
|
645
|
+
};
|
|
646
|
+
|
|
647
647
|
class Vector2 {
|
|
648
648
|
|
|
649
649
|
constructor( x = 0, y = 0 ) {
|
|
@@ -1119,8 +1119,8 @@ class Vector2 {
|
|
|
1119
1119
|
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
1124
|
class Matrix3 {
|
|
1125
1125
|
|
|
1126
1126
|
constructor( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {
|
|
@@ -1506,8 +1506,8 @@ class Matrix3 {
|
|
|
1506
1506
|
|
|
1507
1507
|
}
|
|
1508
1508
|
|
|
1509
|
-
const _m3 = /*@__PURE__*/ new Matrix3();
|
|
1510
|
-
|
|
1509
|
+
const _m3 = /*@__PURE__*/ new Matrix3();
|
|
1510
|
+
|
|
1511
1511
|
function arrayNeedsUint32( array ) {
|
|
1512
1512
|
|
|
1513
1513
|
// assumes larger values usually on last
|
|
@@ -1564,8 +1564,8 @@ function warnOnce( message ) {
|
|
|
1564
1564
|
|
|
1565
1565
|
console.warn( message );
|
|
1566
1566
|
|
|
1567
|
-
}
|
|
1568
|
-
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
1569
|
/**
|
|
1570
1570
|
* Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping
|
|
1571
1571
|
* or clipping. Based on W3C specifications for sRGB and Display P3,
|
|
@@ -1701,8 +1701,8 @@ function LinearToSRGB( c ) {
|
|
|
1701
1701
|
|
|
1702
1702
|
return ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055;
|
|
1703
1703
|
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
1706
|
let _canvas;
|
|
1707
1707
|
|
|
1708
1708
|
class ImageUtils {
|
|
@@ -1826,8 +1826,8 @@ class ImageUtils {
|
|
|
1826
1826
|
|
|
1827
1827
|
}
|
|
1828
1828
|
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
1831
|
let _sourceId = 0;
|
|
1832
1832
|
|
|
1833
1833
|
class Source {
|
|
@@ -1950,8 +1950,8 @@ function serializeImage( image ) {
|
|
|
1950
1950
|
|
|
1951
1951
|
}
|
|
1952
1952
|
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
1955
|
let _textureId = 0;
|
|
1956
1956
|
|
|
1957
1957
|
class Texture extends EventDispatcher {
|
|
@@ -2242,8 +2242,8 @@ class Texture extends EventDispatcher {
|
|
|
2242
2242
|
|
|
2243
2243
|
Texture.DEFAULT_IMAGE = null;
|
|
2244
2244
|
Texture.DEFAULT_MAPPING = UVMapping;
|
|
2245
|
-
Texture.DEFAULT_ANISOTROPY = 1;
|
|
2246
|
-
|
|
2245
|
+
Texture.DEFAULT_ANISOTROPY = 1;
|
|
2246
|
+
|
|
2247
2247
|
class Vector4 {
|
|
2248
2248
|
|
|
2249
2249
|
constructor( x = 0, y = 0, z = 0, w = 1 ) {
|
|
@@ -2885,8 +2885,8 @@ class Vector4 {
|
|
|
2885
2885
|
|
|
2886
2886
|
}
|
|
2887
2887
|
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
2890
|
/*
|
|
2891
2891
|
In options, we can specify:
|
|
2892
2892
|
* Texture parameters for an auto-generated target texture
|
|
@@ -3032,8 +3032,8 @@ class RenderTarget extends EventDispatcher {
|
|
|
3032
3032
|
|
|
3033
3033
|
}
|
|
3034
3034
|
|
|
3035
|
-
}
|
|
3036
|
-
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
3037
|
class WebGLRenderTarget extends RenderTarget {
|
|
3038
3038
|
|
|
3039
3039
|
constructor( width = 1, height = 1, options = {} ) {
|
|
@@ -3044,8 +3044,8 @@ class WebGLRenderTarget extends RenderTarget {
|
|
|
3044
3044
|
|
|
3045
3045
|
}
|
|
3046
3046
|
|
|
3047
|
-
}
|
|
3048
|
-
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
3049
|
class DataArrayTexture extends Texture {
|
|
3050
3050
|
|
|
3051
3051
|
constructor( data = null, width = 1, height = 1, depth = 1 ) {
|
|
@@ -3067,8 +3067,8 @@ class DataArrayTexture extends Texture {
|
|
|
3067
3067
|
|
|
3068
3068
|
}
|
|
3069
3069
|
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
3072
|
class WebGLArrayRenderTarget extends WebGLRenderTarget {
|
|
3073
3073
|
|
|
3074
3074
|
constructor( width = 1, height = 1, depth = 1, options = {} ) {
|
|
@@ -3085,8 +3085,8 @@ class WebGLArrayRenderTarget extends WebGLRenderTarget {
|
|
|
3085
3085
|
|
|
3086
3086
|
}
|
|
3087
3087
|
|
|
3088
|
-
}
|
|
3089
|
-
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
3090
|
class Data3DTexture extends Texture {
|
|
3091
3091
|
|
|
3092
3092
|
constructor( data = null, width = 1, height = 1, depth = 1 ) {
|
|
@@ -3116,8 +3116,8 @@ class Data3DTexture extends Texture {
|
|
|
3116
3116
|
|
|
3117
3117
|
}
|
|
3118
3118
|
|
|
3119
|
-
}
|
|
3120
|
-
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
3121
|
class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
3122
3122
|
|
|
3123
3123
|
constructor( width = 1, height = 1, depth = 1, options = {} ) {
|
|
@@ -3134,8 +3134,8 @@ class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
|
3134
3134
|
|
|
3135
3135
|
}
|
|
3136
3136
|
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
3139
|
class Quaternion {
|
|
3140
3140
|
|
|
3141
3141
|
constructor( x = 0, y = 0, z = 0, w = 1 ) {
|
|
@@ -3817,8 +3817,8 @@ class Quaternion {
|
|
|
3817
3817
|
|
|
3818
3818
|
}
|
|
3819
3819
|
|
|
3820
|
-
}
|
|
3821
|
-
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
3822
|
class Vector3 {
|
|
3823
3823
|
|
|
3824
3824
|
constructor( x = 0, y = 0, z = 0 ) {
|
|
@@ -4537,8 +4537,8 @@ class Vector3 {
|
|
|
4537
4537
|
}
|
|
4538
4538
|
|
|
4539
4539
|
const _vector$c = /*@__PURE__*/ new Vector3();
|
|
4540
|
-
const _quaternion$4 = /*@__PURE__*/ new Quaternion();
|
|
4541
|
-
|
|
4540
|
+
const _quaternion$4 = /*@__PURE__*/ new Quaternion();
|
|
4541
|
+
|
|
4542
4542
|
class Box3 {
|
|
4543
4543
|
|
|
4544
4544
|
constructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) {
|
|
@@ -5068,8 +5068,8 @@ function satForAxes( axes, v0, v1, v2, extents ) {
|
|
|
5068
5068
|
|
|
5069
5069
|
return true;
|
|
5070
5070
|
|
|
5071
|
-
}
|
|
5072
|
-
|
|
5071
|
+
}
|
|
5072
|
+
|
|
5073
5073
|
const _box$3 = /*@__PURE__*/ new Box3();
|
|
5074
5074
|
const _v1$6 = /*@__PURE__*/ new Vector3();
|
|
5075
5075
|
const _v2$3 = /*@__PURE__*/ new Vector3();
|
|
@@ -5309,8 +5309,8 @@ class Sphere {
|
|
|
5309
5309
|
|
|
5310
5310
|
}
|
|
5311
5311
|
|
|
5312
|
-
}
|
|
5313
|
-
|
|
5312
|
+
}
|
|
5313
|
+
|
|
5314
5314
|
const _vector$a = /*@__PURE__*/ new Vector3();
|
|
5315
5315
|
const _segCenter = /*@__PURE__*/ new Vector3();
|
|
5316
5316
|
const _segDir = /*@__PURE__*/ new Vector3();
|
|
@@ -5799,8 +5799,8 @@ class Ray {
|
|
|
5799
5799
|
|
|
5800
5800
|
}
|
|
5801
5801
|
|
|
5802
|
-
}
|
|
5803
|
-
|
|
5802
|
+
}
|
|
5803
|
+
|
|
5804
5804
|
class Matrix4 {
|
|
5805
5805
|
|
|
5806
5806
|
constructor( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {
|
|
@@ -6710,8 +6710,8 @@ const _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 );
|
|
|
6710
6710
|
const _one = /*@__PURE__*/ new Vector3( 1, 1, 1 );
|
|
6711
6711
|
const _x = /*@__PURE__*/ new Vector3();
|
|
6712
6712
|
const _y = /*@__PURE__*/ new Vector3();
|
|
6713
|
-
const _z = /*@__PURE__*/ new Vector3();
|
|
6714
|
-
|
|
6713
|
+
const _z = /*@__PURE__*/ new Vector3();
|
|
6714
|
+
|
|
6715
6715
|
const _matrix$2 = /*@__PURE__*/ new Matrix4();
|
|
6716
6716
|
const _quaternion$3 = /*@__PURE__*/ new Quaternion();
|
|
6717
6717
|
|
|
@@ -7020,8 +7020,8 @@ class Euler {
|
|
|
7020
7020
|
|
|
7021
7021
|
}
|
|
7022
7022
|
|
|
7023
|
-
Euler.DEFAULT_ORDER = 'XYZ';
|
|
7024
|
-
|
|
7023
|
+
Euler.DEFAULT_ORDER = 'XYZ';
|
|
7024
|
+
|
|
7025
7025
|
class Layers {
|
|
7026
7026
|
|
|
7027
7027
|
constructor() {
|
|
@@ -7078,8 +7078,8 @@ class Layers {
|
|
|
7078
7078
|
|
|
7079
7079
|
}
|
|
7080
7080
|
|
|
7081
|
-
}
|
|
7082
|
-
|
|
7081
|
+
}
|
|
7082
|
+
|
|
7083
7083
|
let _object3DId = 0;
|
|
7084
7084
|
|
|
7085
7085
|
const _v1$4 = /*@__PURE__*/ new Vector3();
|
|
@@ -8087,8 +8087,8 @@ class Object3D extends EventDispatcher {
|
|
|
8087
8087
|
|
|
8088
8088
|
Object3D.DEFAULT_UP = /*@__PURE__*/ new Vector3( 0, 1, 0 );
|
|
8089
8089
|
Object3D.DEFAULT_MATRIX_AUTO_UPDATE = true;
|
|
8090
|
-
Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;
|
|
8091
|
-
|
|
8090
|
+
Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;
|
|
8091
|
+
|
|
8092
8092
|
const _v0$1 = /*@__PURE__*/ new Vector3();
|
|
8093
8093
|
const _v1$3 = /*@__PURE__*/ new Vector3();
|
|
8094
8094
|
const _v2$2 = /*@__PURE__*/ new Vector3();
|
|
@@ -8395,8 +8395,8 @@ class Triangle {
|
|
|
8395
8395
|
|
|
8396
8396
|
}
|
|
8397
8397
|
|
|
8398
|
-
}
|
|
8399
|
-
|
|
8398
|
+
}
|
|
8399
|
+
|
|
8400
8400
|
const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,
|
|
8401
8401
|
'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,
|
|
8402
8402
|
'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50,
|
|
@@ -9013,8 +9013,8 @@ class Color {
|
|
|
9013
9013
|
|
|
9014
9014
|
const _color = /*@__PURE__*/ new Color();
|
|
9015
9015
|
|
|
9016
|
-
Color.NAMES = _colorKeywords;
|
|
9017
|
-
|
|
9016
|
+
Color.NAMES = _colorKeywords;
|
|
9017
|
+
|
|
9018
9018
|
let _materialId = 0;
|
|
9019
9019
|
|
|
9020
9020
|
class Material extends EventDispatcher {
|
|
@@ -9530,8 +9530,8 @@ class Material extends EventDispatcher {
|
|
|
9530
9530
|
|
|
9531
9531
|
}
|
|
9532
9532
|
|
|
9533
|
-
}
|
|
9534
|
-
|
|
9533
|
+
}
|
|
9534
|
+
|
|
9535
9535
|
class MeshBasicMaterial extends Material {
|
|
9536
9536
|
|
|
9537
9537
|
constructor( parameters ) {
|
|
@@ -9608,8 +9608,8 @@ class MeshBasicMaterial extends Material {
|
|
|
9608
9608
|
|
|
9609
9609
|
}
|
|
9610
9610
|
|
|
9611
|
-
}
|
|
9612
|
-
|
|
9611
|
+
}
|
|
9612
|
+
|
|
9613
9613
|
// Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf
|
|
9614
9614
|
|
|
9615
9615
|
const _tables = /*@__PURE__*/ _generateTables();
|
|
@@ -9777,8 +9777,8 @@ function fromHalfFloat( val ) {
|
|
|
9777
9777
|
const DataUtils = {
|
|
9778
9778
|
toHalfFloat: toHalfFloat,
|
|
9779
9779
|
fromHalfFloat: fromHalfFloat,
|
|
9780
|
-
};
|
|
9781
|
-
|
|
9780
|
+
};
|
|
9781
|
+
|
|
9782
9782
|
const _vector$9 = /*@__PURE__*/ new Vector3();
|
|
9783
9783
|
const _vector2$1 = /*@__PURE__*/ new Vector2();
|
|
9784
9784
|
|
|
@@ -10395,8 +10395,8 @@ class Float32BufferAttribute extends BufferAttribute {
|
|
|
10395
10395
|
|
|
10396
10396
|
}
|
|
10397
10397
|
|
|
10398
|
-
}
|
|
10399
|
-
|
|
10398
|
+
}
|
|
10399
|
+
|
|
10400
10400
|
let _id$2 = 0;
|
|
10401
10401
|
|
|
10402
10402
|
const _m1$2 = /*@__PURE__*/ new Matrix4();
|
|
@@ -11455,8 +11455,8 @@ class BufferGeometry extends EventDispatcher {
|
|
|
11455
11455
|
|
|
11456
11456
|
}
|
|
11457
11457
|
|
|
11458
|
-
}
|
|
11459
|
-
|
|
11458
|
+
}
|
|
11459
|
+
|
|
11460
11460
|
const _inverseMatrix$3 = /*@__PURE__*/ new Matrix4();
|
|
11461
11461
|
const _ray$3 = /*@__PURE__*/ new Ray();
|
|
11462
11462
|
const _sphere$6 = /*@__PURE__*/ new Sphere();
|
|
@@ -11871,8 +11871,8 @@ function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, n
|
|
|
11871
11871
|
|
|
11872
11872
|
return intersection;
|
|
11873
11873
|
|
|
11874
|
-
}
|
|
11875
|
-
|
|
11874
|
+
}
|
|
11875
|
+
|
|
11876
11876
|
class BoxGeometry extends BufferGeometry {
|
|
11877
11877
|
|
|
11878
11878
|
constructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) {
|
|
@@ -12046,8 +12046,8 @@ class BoxGeometry extends BufferGeometry {
|
|
|
12046
12046
|
|
|
12047
12047
|
}
|
|
12048
12048
|
|
|
12049
|
-
}
|
|
12050
|
-
|
|
12049
|
+
}
|
|
12050
|
+
|
|
12051
12051
|
/**
|
|
12052
12052
|
* Uniform Utilities
|
|
12053
12053
|
*/
|
|
@@ -12147,12 +12147,12 @@ function getUnlitUniformColorSpace( renderer ) {
|
|
|
12147
12147
|
|
|
12148
12148
|
// Legacy
|
|
12149
12149
|
|
|
12150
|
-
const UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms };
|
|
12151
|
-
|
|
12152
|
-
var default_vertex = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";
|
|
12153
|
-
|
|
12154
|
-
var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";
|
|
12155
|
-
|
|
12150
|
+
const UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms };
|
|
12151
|
+
|
|
12152
|
+
var default_vertex = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";
|
|
12153
|
+
|
|
12154
|
+
var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";
|
|
12155
|
+
|
|
12156
12156
|
class ShaderMaterial extends Material {
|
|
12157
12157
|
|
|
12158
12158
|
constructor( parameters ) {
|
|
@@ -12333,8 +12333,8 @@ class ShaderMaterial extends Material {
|
|
|
12333
12333
|
|
|
12334
12334
|
}
|
|
12335
12335
|
|
|
12336
|
-
}
|
|
12337
|
-
|
|
12336
|
+
}
|
|
12337
|
+
|
|
12338
12338
|
class Camera extends Object3D {
|
|
12339
12339
|
|
|
12340
12340
|
constructor() {
|
|
@@ -12397,8 +12397,8 @@ class Camera extends Object3D {
|
|
|
12397
12397
|
|
|
12398
12398
|
}
|
|
12399
12399
|
|
|
12400
|
-
}
|
|
12401
|
-
|
|
12400
|
+
}
|
|
12401
|
+
|
|
12402
12402
|
const _v3$1 = /*@__PURE__*/ new Vector3();
|
|
12403
12403
|
const _minTarget = /*@__PURE__*/ new Vector2();
|
|
12404
12404
|
const _maxTarget = /*@__PURE__*/ new Vector2();
|
|
@@ -12659,8 +12659,8 @@ class PerspectiveCamera extends Camera {
|
|
|
12659
12659
|
|
|
12660
12660
|
}
|
|
12661
12661
|
|
|
12662
|
-
}
|
|
12663
|
-
|
|
12662
|
+
}
|
|
12663
|
+
|
|
12664
12664
|
const fov = - 90; // negative fov is not an error
|
|
12665
12665
|
const aspect = 1;
|
|
12666
12666
|
|
|
@@ -12827,8 +12827,8 @@ class CubeCamera extends Object3D {
|
|
|
12827
12827
|
|
|
12828
12828
|
}
|
|
12829
12829
|
|
|
12830
|
-
}
|
|
12831
|
-
|
|
12830
|
+
}
|
|
12831
|
+
|
|
12832
12832
|
class CubeTexture extends Texture {
|
|
12833
12833
|
|
|
12834
12834
|
constructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ) {
|
|
@@ -12856,8 +12856,8 @@ class CubeTexture extends Texture {
|
|
|
12856
12856
|
|
|
12857
12857
|
}
|
|
12858
12858
|
|
|
12859
|
-
}
|
|
12860
|
-
|
|
12859
|
+
}
|
|
12860
|
+
|
|
12861
12861
|
class WebGLCubeRenderTarget extends WebGLRenderTarget {
|
|
12862
12862
|
|
|
12863
12863
|
constructor( size = 1, options = {} ) {
|
|
@@ -12992,8 +12992,8 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
|
|
|
12992
12992
|
|
|
12993
12993
|
}
|
|
12994
12994
|
|
|
12995
|
-
}
|
|
12996
|
-
|
|
12995
|
+
}
|
|
12996
|
+
|
|
12997
12997
|
const _vector1 = /*@__PURE__*/ new Vector3();
|
|
12998
12998
|
const _vector2 = /*@__PURE__*/ new Vector3();
|
|
12999
12999
|
const _normalMatrix = /*@__PURE__*/ new Matrix3();
|
|
@@ -13193,8 +13193,8 @@ class Plane {
|
|
|
13193
13193
|
|
|
13194
13194
|
}
|
|
13195
13195
|
|
|
13196
|
-
}
|
|
13197
|
-
|
|
13196
|
+
}
|
|
13197
|
+
|
|
13198
13198
|
const _sphere$5 = /*@__PURE__*/ new Sphere();
|
|
13199
13199
|
const _vector$7 = /*@__PURE__*/ new Vector3();
|
|
13200
13200
|
|
|
@@ -13372,8 +13372,8 @@ class Frustum {
|
|
|
13372
13372
|
|
|
13373
13373
|
}
|
|
13374
13374
|
|
|
13375
|
-
}
|
|
13376
|
-
|
|
13375
|
+
}
|
|
13376
|
+
|
|
13377
13377
|
function WebGLAnimation() {
|
|
13378
13378
|
|
|
13379
13379
|
let context = null;
|
|
@@ -13424,8 +13424,8 @@ function WebGLAnimation() {
|
|
|
13424
13424
|
|
|
13425
13425
|
};
|
|
13426
13426
|
|
|
13427
|
-
}
|
|
13428
|
-
|
|
13427
|
+
}
|
|
13428
|
+
|
|
13429
13429
|
function WebGLAttributes( gl, capabilities ) {
|
|
13430
13430
|
|
|
13431
13431
|
const isWebGL2 = capabilities.isWebGL2;
|
|
@@ -13651,8 +13651,8 @@ function WebGLAttributes( gl, capabilities ) {
|
|
|
13651
13651
|
|
|
13652
13652
|
};
|
|
13653
13653
|
|
|
13654
|
-
}
|
|
13655
|
-
|
|
13654
|
+
}
|
|
13655
|
+
|
|
13656
13656
|
class PlaneGeometry extends BufferGeometry {
|
|
13657
13657
|
|
|
13658
13658
|
constructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) {
|
|
@@ -13745,292 +13745,292 @@ class PlaneGeometry extends BufferGeometry {
|
|
|
13745
13745
|
|
|
13746
13746
|
}
|
|
13747
13747
|
|
|
13748
|
-
}
|
|
13749
|
-
|
|
13750
|
-
var alphahash_fragment = "#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif";
|
|
13751
|
-
|
|
13752
|
-
var alphahash_pars_fragment = "#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif";
|
|
13753
|
-
|
|
13754
|
-
var alphamap_fragment = "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif";
|
|
13755
|
-
|
|
13756
|
-
var alphamap_pars_fragment = "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";
|
|
13757
|
-
|
|
13758
|
-
var alphatest_fragment = "#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif";
|
|
13759
|
-
|
|
13760
|
-
var alphatest_pars_fragment = "#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif";
|
|
13761
|
-
|
|
13762
|
-
var aomap_fragment = "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif";
|
|
13763
|
-
|
|
13764
|
-
var aomap_pars_fragment = "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";
|
|
13765
|
-
|
|
13766
|
-
var batching_pars_vertex = "#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";
|
|
13767
|
-
|
|
13768
|
-
var batching_vertex = "#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif";
|
|
13769
|
-
|
|
13770
|
-
var begin_vertex = "vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif";
|
|
13771
|
-
|
|
13772
|
-
var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif";
|
|
13773
|
-
|
|
13774
|
-
var bsdfs = "float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated";
|
|
13775
|
-
|
|
13776
|
-
var iridescence_fragment = "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif";
|
|
13777
|
-
|
|
13778
|
-
var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";
|
|
13779
|
-
|
|
13780
|
-
var clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif";
|
|
13781
|
-
|
|
13782
|
-
var clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif";
|
|
13783
|
-
|
|
13784
|
-
var clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif";
|
|
13785
|
-
|
|
13786
|
-
var clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif";
|
|
13787
|
-
|
|
13788
|
-
var color_fragment = "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif";
|
|
13789
|
-
|
|
13790
|
-
var color_pars_fragment = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif";
|
|
13791
|
-
|
|
13792
|
-
var color_pars_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif";
|
|
13793
|
-
|
|
13794
|
-
var color_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif";
|
|
13795
|
-
|
|
13796
|
-
var common = "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated";
|
|
13797
|
-
|
|
13798
|
-
var cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif";
|
|
13799
|
-
|
|
13800
|
-
var defaultnormal_vertex = "vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif";
|
|
13801
|
-
|
|
13802
|
-
var displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif";
|
|
13803
|
-
|
|
13804
|
-
var displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif";
|
|
13805
|
-
|
|
13806
|
-
var emissivemap_fragment = "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif";
|
|
13807
|
-
|
|
13808
|
-
var emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif";
|
|
13809
|
-
|
|
13810
|
-
var colorspace_fragment = "gl_FragColor = linearToOutputTexel( gl_FragColor );";
|
|
13811
|
-
|
|
13812
|
-
var colorspace_pars_fragment = "\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}";
|
|
13813
|
-
|
|
13814
|
-
var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif";
|
|
13815
|
-
|
|
13816
|
-
var envmap_common_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif";
|
|
13817
|
-
|
|
13818
|
-
var envmap_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif";
|
|
13819
|
-
|
|
13820
|
-
var envmap_pars_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif";
|
|
13821
|
-
|
|
13822
|
-
var envmap_vertex = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif";
|
|
13823
|
-
|
|
13824
|
-
var fog_vertex = "#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif";
|
|
13825
|
-
|
|
13826
|
-
var fog_pars_vertex = "#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif";
|
|
13827
|
-
|
|
13828
|
-
var fog_fragment = "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif";
|
|
13829
|
-
|
|
13830
|
-
var fog_pars_fragment = "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";
|
|
13831
|
-
|
|
13832
|
-
var gradientmap_pars_fragment = "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}";
|
|
13833
|
-
|
|
13834
|
-
var lightmap_fragment = "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif";
|
|
13835
|
-
|
|
13836
|
-
var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";
|
|
13837
|
-
|
|
13838
|
-
var lights_lambert_fragment = "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;";
|
|
13839
|
-
|
|
13840
|
-
var lights_lambert_pars_fragment = "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert";
|
|
13841
|
-
|
|
13842
|
-
var lights_pars_begin = "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif";
|
|
13843
|
-
|
|
13844
|
-
var envmap_physical_pars_fragment = "#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif";
|
|
13845
|
-
|
|
13846
|
-
var lights_toon_fragment = "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;";
|
|
13847
|
-
|
|
13848
|
-
var lights_toon_pars_fragment = "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon";
|
|
13849
|
-
|
|
13850
|
-
var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;";
|
|
13851
|
-
|
|
13852
|
-
var lights_phong_pars_fragment = "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong";
|
|
13853
|
-
|
|
13854
|
-
var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif";
|
|
13855
|
-
|
|
13856
|
-
var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";
|
|
13857
|
-
|
|
13858
|
-
var lights_fragment_begin = "\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif";
|
|
13859
|
-
|
|
13860
|
-
var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif";
|
|
13861
|
-
|
|
13862
|
-
var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif";
|
|
13863
|
-
|
|
13864
|
-
var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";
|
|
13865
|
-
|
|
13866
|
-
var logdepthbuf_pars_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";
|
|
13867
|
-
|
|
13868
|
-
var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif";
|
|
13869
|
-
|
|
13870
|
-
var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif";
|
|
13871
|
-
|
|
13872
|
-
var map_fragment = "#ifdef USE_MAP\n#ifdef USE_MIPMAP_BIAS\n vec4 sampledDiffuseColor = texture2D( map, vMapUv, mipmapBias );\n#else\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n#endif\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif";
|
|
13873
|
-
|
|
13874
|
-
var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n \n#ifdef USE_MIPMAP_BIAS\n uniform float mipmapBias;\n#endif\n#endif";
|
|
13875
|
-
|
|
13876
|
-
var map_particle_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif";
|
|
13877
|
-
|
|
13878
|
-
var map_particle_pars_fragment = "#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";
|
|
13879
|
-
|
|
13880
|
-
var metalnessmap_fragment = "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif";
|
|
13881
|
-
|
|
13882
|
-
var metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";
|
|
13883
|
-
|
|
13884
|
-
var morphinstance_vertex = "#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif";
|
|
13885
|
-
|
|
13886
|
-
var morphcolor_vertex = "#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif";
|
|
13887
|
-
|
|
13888
|
-
var morphnormal_vertex = "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif";
|
|
13889
|
-
|
|
13890
|
-
var morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif";
|
|
13891
|
-
|
|
13892
|
-
var morphtarget_vertex = "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif";
|
|
13893
|
-
|
|
13894
|
-
var normal_fragment_begin = "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;";
|
|
13895
|
-
|
|
13896
|
-
var normal_fragment_maps = "#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif";
|
|
13897
|
-
|
|
13898
|
-
var normal_pars_fragment = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";
|
|
13899
|
-
|
|
13900
|
-
var normal_pars_vertex = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";
|
|
13901
|
-
|
|
13902
|
-
var normal_vertex = "#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif";
|
|
13903
|
-
|
|
13904
|
-
var normalmap_pars_fragment = "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif";
|
|
13905
|
-
|
|
13906
|
-
var clearcoat_normal_fragment_begin = "#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif";
|
|
13907
|
-
|
|
13908
|
-
var clearcoat_normal_fragment_maps = "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif";
|
|
13909
|
-
|
|
13910
|
-
var clearcoat_pars_fragment = "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif";
|
|
13911
|
-
|
|
13912
|
-
var iridescence_pars_fragment = "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif";
|
|
13913
|
-
|
|
13914
|
-
var opaque_fragment = "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );";
|
|
13915
|
-
|
|
13916
|
-
var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}";
|
|
13917
|
-
|
|
13918
|
-
var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif";
|
|
13919
|
-
|
|
13920
|
-
var project_vertex = "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;";
|
|
13921
|
-
|
|
13922
|
-
var dithering_fragment = "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";
|
|
13923
|
-
|
|
13924
|
-
var dithering_pars_fragment = "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif";
|
|
13925
|
-
|
|
13926
|
-
var roughnessmap_fragment = "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif";
|
|
13927
|
-
|
|
13928
|
-
var roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";
|
|
13929
|
-
|
|
13930
|
-
var shadowmap_pars_fragment = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif";
|
|
13931
|
-
|
|
13932
|
-
var shadowmap_pars_vertex = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif";
|
|
13933
|
-
|
|
13934
|
-
var shadowmap_vertex = "#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif";
|
|
13935
|
-
|
|
13936
|
-
var shadowmask_pars_fragment = "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}";
|
|
13937
|
-
|
|
13938
|
-
var skinbase_vertex = "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";
|
|
13939
|
-
|
|
13940
|
-
var skinning_pars_vertex = "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";
|
|
13941
|
-
|
|
13942
|
-
var skinning_vertex = "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif";
|
|
13943
|
-
|
|
13944
|
-
var skinnormal_vertex = "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif";
|
|
13945
|
-
|
|
13946
|
-
var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";
|
|
13947
|
-
|
|
13948
|
-
var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";
|
|
13949
|
-
|
|
13950
|
-
var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";
|
|
13951
|
-
|
|
13952
|
-
var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tfloat startCompression = 0.8 - 0.04;\n\tfloat desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min(color.r, min(color.g, color.b));\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max(color.r, max(color.g, color.b));\n\tif (peak < startCompression) return color;\n\tfloat d = 1. - startCompression;\n\tfloat newPeak = 1. - d * d / (peak + d - startCompression);\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / (desaturation * (peak - newPeak) + 1.);\n\treturn mix(color, vec3(1, 1, 1), g);\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";
|
|
13953
|
-
|
|
13954
|
-
var transmission_fragment = "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif";
|
|
13955
|
-
|
|
13956
|
-
var transmission_pars_fragment = "#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif";
|
|
13957
|
-
|
|
13958
|
-
var uv_pars_fragment = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";
|
|
13959
|
-
|
|
13960
|
-
var uv_pars_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";
|
|
13961
|
-
|
|
13962
|
-
var uv_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif";
|
|
13963
|
-
|
|
13964
|
-
var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif";
|
|
13965
|
-
|
|
13748
|
+
}
|
|
13749
|
+
|
|
13750
|
+
var alphahash_fragment = "#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif";
|
|
13751
|
+
|
|
13752
|
+
var alphahash_pars_fragment = "#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif";
|
|
13753
|
+
|
|
13754
|
+
var alphamap_fragment = "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif";
|
|
13755
|
+
|
|
13756
|
+
var alphamap_pars_fragment = "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";
|
|
13757
|
+
|
|
13758
|
+
var alphatest_fragment = "#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif";
|
|
13759
|
+
|
|
13760
|
+
var alphatest_pars_fragment = "#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif";
|
|
13761
|
+
|
|
13762
|
+
var aomap_fragment = "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif";
|
|
13763
|
+
|
|
13764
|
+
var aomap_pars_fragment = "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";
|
|
13765
|
+
|
|
13766
|
+
var batching_pars_vertex = "#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";
|
|
13767
|
+
|
|
13768
|
+
var batching_vertex = "#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif";
|
|
13769
|
+
|
|
13770
|
+
var begin_vertex = "vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif";
|
|
13771
|
+
|
|
13772
|
+
var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif";
|
|
13773
|
+
|
|
13774
|
+
var bsdfs = "float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated";
|
|
13775
|
+
|
|
13776
|
+
var iridescence_fragment = "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif";
|
|
13777
|
+
|
|
13778
|
+
var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";
|
|
13779
|
+
|
|
13780
|
+
var clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif";
|
|
13781
|
+
|
|
13782
|
+
var clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif";
|
|
13783
|
+
|
|
13784
|
+
var clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif";
|
|
13785
|
+
|
|
13786
|
+
var clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif";
|
|
13787
|
+
|
|
13788
|
+
var color_fragment = "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif";
|
|
13789
|
+
|
|
13790
|
+
var color_pars_fragment = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif";
|
|
13791
|
+
|
|
13792
|
+
var color_pars_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif";
|
|
13793
|
+
|
|
13794
|
+
var color_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif";
|
|
13795
|
+
|
|
13796
|
+
var common = "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated";
|
|
13797
|
+
|
|
13798
|
+
var cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif";
|
|
13799
|
+
|
|
13800
|
+
var defaultnormal_vertex = "vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif";
|
|
13801
|
+
|
|
13802
|
+
var displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif";
|
|
13803
|
+
|
|
13804
|
+
var displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif";
|
|
13805
|
+
|
|
13806
|
+
var emissivemap_fragment = "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif";
|
|
13807
|
+
|
|
13808
|
+
var emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif";
|
|
13809
|
+
|
|
13810
|
+
var colorspace_fragment = "gl_FragColor = linearToOutputTexel( gl_FragColor );";
|
|
13811
|
+
|
|
13812
|
+
var colorspace_pars_fragment = "\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}";
|
|
13813
|
+
|
|
13814
|
+
var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif";
|
|
13815
|
+
|
|
13816
|
+
var envmap_common_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif";
|
|
13817
|
+
|
|
13818
|
+
var envmap_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif";
|
|
13819
|
+
|
|
13820
|
+
var envmap_pars_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif";
|
|
13821
|
+
|
|
13822
|
+
var envmap_vertex = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif";
|
|
13823
|
+
|
|
13824
|
+
var fog_vertex = "#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif";
|
|
13825
|
+
|
|
13826
|
+
var fog_pars_vertex = "#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif";
|
|
13827
|
+
|
|
13828
|
+
var fog_fragment = "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif";
|
|
13829
|
+
|
|
13830
|
+
var fog_pars_fragment = "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";
|
|
13831
|
+
|
|
13832
|
+
var gradientmap_pars_fragment = "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}";
|
|
13833
|
+
|
|
13834
|
+
var lightmap_fragment = "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif";
|
|
13835
|
+
|
|
13836
|
+
var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";
|
|
13837
|
+
|
|
13838
|
+
var lights_lambert_fragment = "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;";
|
|
13839
|
+
|
|
13840
|
+
var lights_lambert_pars_fragment = "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert";
|
|
13841
|
+
|
|
13842
|
+
var lights_pars_begin = "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif";
|
|
13843
|
+
|
|
13844
|
+
var envmap_physical_pars_fragment = "#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif";
|
|
13845
|
+
|
|
13846
|
+
var lights_toon_fragment = "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;";
|
|
13847
|
+
|
|
13848
|
+
var lights_toon_pars_fragment = "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon";
|
|
13849
|
+
|
|
13850
|
+
var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;";
|
|
13851
|
+
|
|
13852
|
+
var lights_phong_pars_fragment = "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong";
|
|
13853
|
+
|
|
13854
|
+
var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif";
|
|
13855
|
+
|
|
13856
|
+
var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";
|
|
13857
|
+
|
|
13858
|
+
var lights_fragment_begin = "\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif";
|
|
13859
|
+
|
|
13860
|
+
var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif";
|
|
13861
|
+
|
|
13862
|
+
var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif";
|
|
13863
|
+
|
|
13864
|
+
var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";
|
|
13865
|
+
|
|
13866
|
+
var logdepthbuf_pars_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";
|
|
13867
|
+
|
|
13868
|
+
var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif";
|
|
13869
|
+
|
|
13870
|
+
var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif";
|
|
13871
|
+
|
|
13872
|
+
var map_fragment = "#ifdef USE_MAP\n#ifdef USE_MIPMAP_BIAS\n vec4 sampledDiffuseColor = texture2D( map, vMapUv, mipmapBias );\n#else\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n#endif\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif";
|
|
13873
|
+
|
|
13874
|
+
var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n \n#ifdef USE_MIPMAP_BIAS\n uniform float mipmapBias;\n#endif\n#endif";
|
|
13875
|
+
|
|
13876
|
+
var map_particle_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif";
|
|
13877
|
+
|
|
13878
|
+
var map_particle_pars_fragment = "#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";
|
|
13879
|
+
|
|
13880
|
+
var metalnessmap_fragment = "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif";
|
|
13881
|
+
|
|
13882
|
+
var metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";
|
|
13883
|
+
|
|
13884
|
+
var morphinstance_vertex = "#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif";
|
|
13885
|
+
|
|
13886
|
+
var morphcolor_vertex = "#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif";
|
|
13887
|
+
|
|
13888
|
+
var morphnormal_vertex = "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif";
|
|
13889
|
+
|
|
13890
|
+
var morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif";
|
|
13891
|
+
|
|
13892
|
+
var morphtarget_vertex = "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif";
|
|
13893
|
+
|
|
13894
|
+
var normal_fragment_begin = "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;";
|
|
13895
|
+
|
|
13896
|
+
var normal_fragment_maps = "#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif";
|
|
13897
|
+
|
|
13898
|
+
var normal_pars_fragment = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";
|
|
13899
|
+
|
|
13900
|
+
var normal_pars_vertex = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";
|
|
13901
|
+
|
|
13902
|
+
var normal_vertex = "#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif";
|
|
13903
|
+
|
|
13904
|
+
var normalmap_pars_fragment = "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif";
|
|
13905
|
+
|
|
13906
|
+
var clearcoat_normal_fragment_begin = "#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif";
|
|
13907
|
+
|
|
13908
|
+
var clearcoat_normal_fragment_maps = "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif";
|
|
13909
|
+
|
|
13910
|
+
var clearcoat_pars_fragment = "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif";
|
|
13911
|
+
|
|
13912
|
+
var iridescence_pars_fragment = "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif";
|
|
13913
|
+
|
|
13914
|
+
var opaque_fragment = "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );";
|
|
13915
|
+
|
|
13916
|
+
var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}";
|
|
13917
|
+
|
|
13918
|
+
var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif";
|
|
13919
|
+
|
|
13920
|
+
var project_vertex = "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;";
|
|
13921
|
+
|
|
13922
|
+
var dithering_fragment = "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";
|
|
13923
|
+
|
|
13924
|
+
var dithering_pars_fragment = "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif";
|
|
13925
|
+
|
|
13926
|
+
var roughnessmap_fragment = "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif";
|
|
13927
|
+
|
|
13928
|
+
var roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";
|
|
13929
|
+
|
|
13930
|
+
var shadowmap_pars_fragment = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif";
|
|
13931
|
+
|
|
13932
|
+
var shadowmap_pars_vertex = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif";
|
|
13933
|
+
|
|
13934
|
+
var shadowmap_vertex = "#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif";
|
|
13935
|
+
|
|
13936
|
+
var shadowmask_pars_fragment = "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}";
|
|
13937
|
+
|
|
13938
|
+
var skinbase_vertex = "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";
|
|
13939
|
+
|
|
13940
|
+
var skinning_pars_vertex = "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";
|
|
13941
|
+
|
|
13942
|
+
var skinning_vertex = "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif";
|
|
13943
|
+
|
|
13944
|
+
var skinnormal_vertex = "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif";
|
|
13945
|
+
|
|
13946
|
+
var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";
|
|
13947
|
+
|
|
13948
|
+
var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";
|
|
13949
|
+
|
|
13950
|
+
var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";
|
|
13951
|
+
|
|
13952
|
+
var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tfloat startCompression = 0.8 - 0.04;\n\tfloat desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min(color.r, min(color.g, color.b));\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max(color.r, max(color.g, color.b));\n\tif (peak < startCompression) return color;\n\tfloat d = 1. - startCompression;\n\tfloat newPeak = 1. - d * d / (peak + d - startCompression);\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / (desaturation * (peak - newPeak) + 1.);\n\treturn mix(color, vec3(1, 1, 1), g);\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";
|
|
13953
|
+
|
|
13954
|
+
var transmission_fragment = "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif";
|
|
13955
|
+
|
|
13956
|
+
var transmission_pars_fragment = "#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif";
|
|
13957
|
+
|
|
13958
|
+
var uv_pars_fragment = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";
|
|
13959
|
+
|
|
13960
|
+
var uv_pars_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";
|
|
13961
|
+
|
|
13962
|
+
var uv_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif";
|
|
13963
|
+
|
|
13964
|
+
var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif";
|
|
13965
|
+
|
|
13966
13966
|
const vertex$h = "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}";
|
|
13967
13967
|
|
|
13968
|
-
const fragment$h = "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13969
|
-
|
|
13968
|
+
const fragment$h = "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13969
|
+
|
|
13970
13970
|
const vertex$g = "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";
|
|
13971
13971
|
|
|
13972
|
-
const fragment$g = "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13973
|
-
|
|
13972
|
+
const fragment$g = "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13973
|
+
|
|
13974
13974
|
const vertex$f = "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";
|
|
13975
13975
|
|
|
13976
|
-
const fragment$f = "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13977
|
-
|
|
13976
|
+
const fragment$f = "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13977
|
+
|
|
13978
13978
|
const vertex$e = "#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}";
|
|
13979
13979
|
|
|
13980
|
-
const fragment$e = "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}";
|
|
13981
|
-
|
|
13980
|
+
const fragment$e = "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}";
|
|
13981
|
+
|
|
13982
13982
|
const vertex$d = "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}";
|
|
13983
13983
|
|
|
13984
|
-
const fragment$d = "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}";
|
|
13985
|
-
|
|
13984
|
+
const fragment$d = "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}";
|
|
13985
|
+
|
|
13986
13986
|
const vertex$c = "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}";
|
|
13987
13987
|
|
|
13988
|
-
const fragment$c = "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13989
|
-
|
|
13988
|
+
const fragment$c = "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13989
|
+
|
|
13990
13990
|
const vertex$b = "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";
|
|
13991
13991
|
|
|
13992
|
-
const fragment$b = "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";
|
|
13993
|
-
|
|
13992
|
+
const fragment$b = "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";
|
|
13993
|
+
|
|
13994
13994
|
const vertex$a = "#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}";
|
|
13995
13995
|
|
|
13996
|
-
const fragment$a = "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
13997
|
-
|
|
13996
|
+
const fragment$a = "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
13997
|
+
|
|
13998
13998
|
const vertex$9 = "#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";
|
|
13999
13999
|
|
|
14000
|
-
const fragment$9 = "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14001
|
-
|
|
14000
|
+
const fragment$9 = "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14001
|
+
|
|
14002
14002
|
const vertex$8 = "#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}";
|
|
14003
14003
|
|
|
14004
|
-
const fragment$8 = "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14005
|
-
|
|
14004
|
+
const fragment$8 = "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14005
|
+
|
|
14006
14006
|
const vertex$7 = "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}";
|
|
14007
14007
|
|
|
14008
|
-
const fragment$7 = "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}";
|
|
14009
|
-
|
|
14008
|
+
const fragment$7 = "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}";
|
|
14009
|
+
|
|
14010
14010
|
const vertex$6 = "#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";
|
|
14011
14011
|
|
|
14012
|
-
const fragment$6 = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14013
|
-
|
|
14012
|
+
const fragment$6 = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14013
|
+
|
|
14014
14014
|
const vertex$5 = "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}";
|
|
14015
14015
|
|
|
14016
|
-
const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14017
|
-
|
|
14016
|
+
const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14017
|
+
|
|
14018
14018
|
const vertex$4 = "#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";
|
|
14019
14019
|
|
|
14020
|
-
const fragment$4 = "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14021
|
-
|
|
14020
|
+
const fragment$4 = "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";
|
|
14021
|
+
|
|
14022
14022
|
const vertex$3 = "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}";
|
|
14023
14023
|
|
|
14024
|
-
const fragment$3 = "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";
|
|
14025
|
-
|
|
14024
|
+
const fragment$3 = "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";
|
|
14025
|
+
|
|
14026
14026
|
const vertex$2 = "#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";
|
|
14027
14027
|
|
|
14028
|
-
const fragment$2 = "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";
|
|
14029
|
-
|
|
14028
|
+
const fragment$2 = "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";
|
|
14029
|
+
|
|
14030
14030
|
const vertex$1 = "uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";
|
|
14031
14031
|
|
|
14032
|
-
const fragment$1 = "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";
|
|
14033
|
-
|
|
14032
|
+
const fragment$1 = "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";
|
|
14033
|
+
|
|
14034
14034
|
const ShaderChunk = {
|
|
14035
14035
|
alphahash_fragment: alphahash_fragment,
|
|
14036
14036
|
alphahash_pars_fragment: alphahash_pars_fragment,
|
|
@@ -14175,8 +14175,8 @@ const ShaderChunk = {
|
|
|
14175
14175
|
shadow_frag: fragment$2,
|
|
14176
14176
|
sprite_vert: vertex$1,
|
|
14177
14177
|
sprite_frag: fragment$1
|
|
14178
|
-
};
|
|
14179
|
-
|
|
14178
|
+
};
|
|
14179
|
+
|
|
14180
14180
|
/**
|
|
14181
14181
|
* Uniforms library for shared webgl shaders
|
|
14182
14182
|
*/
|
|
@@ -14401,8 +14401,8 @@ const UniformsLib = {
|
|
|
14401
14401
|
|
|
14402
14402
|
}
|
|
14403
14403
|
|
|
14404
|
-
};
|
|
14405
|
-
|
|
14404
|
+
};
|
|
14405
|
+
|
|
14406
14406
|
const ShaderLib = {
|
|
14407
14407
|
|
|
14408
14408
|
basic: {
|
|
@@ -14751,8 +14751,8 @@ ShaderLib.physical = {
|
|
|
14751
14751
|
vertexShader: ShaderChunk.meshphysical_vert,
|
|
14752
14752
|
fragmentShader: ShaderChunk.meshphysical_frag
|
|
14753
14753
|
|
|
14754
|
-
};
|
|
14755
|
-
|
|
14754
|
+
};
|
|
14755
|
+
|
|
14756
14756
|
const _rgb = { r: 0, b: 0, g: 0 };
|
|
14757
14757
|
const _e1$1 = /*@__PURE__*/ new Euler();
|
|
14758
14758
|
const _m1$1 = /*@__PURE__*/ new Matrix4();
|
|
@@ -14994,8 +14994,8 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
|
|
|
14994
14994
|
|
|
14995
14995
|
};
|
|
14996
14996
|
|
|
14997
|
-
}
|
|
14998
|
-
|
|
14997
|
+
}
|
|
14998
|
+
|
|
14999
14999
|
function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
|
|
15000
15000
|
|
|
15001
15001
|
const maxVertexAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS );
|
|
@@ -15621,8 +15621,8 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
|
|
|
15621
15621
|
|
|
15622
15622
|
};
|
|
15623
15623
|
|
|
15624
|
-
}
|
|
15625
|
-
|
|
15624
|
+
}
|
|
15625
|
+
|
|
15626
15626
|
function WebGLBufferRenderer( gl, extensions, info, capabilities ) {
|
|
15627
15627
|
|
|
15628
15628
|
const isWebGL2 = capabilities.isWebGL2;
|
|
@@ -15711,8 +15711,8 @@ function WebGLBufferRenderer( gl, extensions, info, capabilities ) {
|
|
|
15711
15711
|
this.renderInstances = renderInstances;
|
|
15712
15712
|
this.renderMultiDraw = renderMultiDraw;
|
|
15713
15713
|
|
|
15714
|
-
}
|
|
15715
|
-
|
|
15714
|
+
}
|
|
15715
|
+
|
|
15716
15716
|
function WebGLCapabilities( gl, extensions, parameters ) {
|
|
15717
15717
|
|
|
15718
15718
|
let maxAnisotropy;
|
|
@@ -15829,8 +15829,8 @@ function WebGLCapabilities( gl, extensions, parameters ) {
|
|
|
15829
15829
|
|
|
15830
15830
|
};
|
|
15831
15831
|
|
|
15832
|
-
}
|
|
15833
|
-
|
|
15832
|
+
}
|
|
15833
|
+
|
|
15834
15834
|
function WebGLClipping( properties ) {
|
|
15835
15835
|
|
|
15836
15836
|
const scope = this;
|
|
@@ -15995,8 +15995,8 @@ function WebGLClipping( properties ) {
|
|
|
15995
15995
|
|
|
15996
15996
|
}
|
|
15997
15997
|
|
|
15998
|
-
}
|
|
15999
|
-
|
|
15998
|
+
}
|
|
15999
|
+
|
|
16000
16000
|
function WebGLCubeMaps( renderer ) {
|
|
16001
16001
|
|
|
16002
16002
|
let cubemaps = new WeakMap();
|
|
@@ -16090,8 +16090,8 @@ function WebGLCubeMaps( renderer ) {
|
|
|
16090
16090
|
dispose: dispose
|
|
16091
16091
|
};
|
|
16092
16092
|
|
|
16093
|
-
}
|
|
16094
|
-
|
|
16093
|
+
}
|
|
16094
|
+
|
|
16095
16095
|
class OrthographicCamera extends Camera {
|
|
16096
16096
|
|
|
16097
16097
|
constructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) {
|
|
@@ -16223,8 +16223,8 @@ class OrthographicCamera extends Camera {
|
|
|
16223
16223
|
|
|
16224
16224
|
}
|
|
16225
16225
|
|
|
16226
|
-
}
|
|
16227
|
-
|
|
16226
|
+
}
|
|
16227
|
+
|
|
16228
16228
|
const LOD_MIN = 4;
|
|
16229
16229
|
|
|
16230
16230
|
// The standard deviations (radians) associated with the extra mips. These are
|
|
@@ -17109,8 +17109,8 @@ function _getCommonVertexShader() {
|
|
|
17109
17109
|
}
|
|
17110
17110
|
`;
|
|
17111
17111
|
|
|
17112
|
-
}
|
|
17113
|
-
|
|
17112
|
+
}
|
|
17113
|
+
|
|
17114
17114
|
function WebGLCubeUVMaps( renderer ) {
|
|
17115
17115
|
|
|
17116
17116
|
let cubeUVmaps = new WeakMap();
|
|
@@ -17237,8 +17237,8 @@ function WebGLCubeUVMaps( renderer ) {
|
|
|
17237
17237
|
dispose: dispose
|
|
17238
17238
|
};
|
|
17239
17239
|
|
|
17240
|
-
}
|
|
17241
|
-
|
|
17240
|
+
}
|
|
17241
|
+
|
|
17242
17242
|
function WebGLExtensions( gl ) {
|
|
17243
17243
|
|
|
17244
17244
|
const extensions = {};
|
|
@@ -17332,8 +17332,8 @@ function WebGLExtensions( gl ) {
|
|
|
17332
17332
|
|
|
17333
17333
|
};
|
|
17334
17334
|
|
|
17335
|
-
}
|
|
17336
|
-
|
|
17335
|
+
}
|
|
17336
|
+
|
|
17337
17337
|
function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
17338
17338
|
|
|
17339
17339
|
const geometries = {};
|
|
@@ -17538,8 +17538,8 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
|
17538
17538
|
|
|
17539
17539
|
};
|
|
17540
17540
|
|
|
17541
|
-
}
|
|
17542
|
-
|
|
17541
|
+
}
|
|
17542
|
+
|
|
17543
17543
|
function WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) {
|
|
17544
17544
|
|
|
17545
17545
|
const isWebGL2 = capabilities.isWebGL2;
|
|
@@ -17638,8 +17638,8 @@ function WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) {
|
|
|
17638
17638
|
this.renderInstances = renderInstances;
|
|
17639
17639
|
this.renderMultiDraw = renderMultiDraw;
|
|
17640
17640
|
|
|
17641
|
-
}
|
|
17642
|
-
|
|
17641
|
+
}
|
|
17642
|
+
|
|
17643
17643
|
function WebGLInfo( gl ) {
|
|
17644
17644
|
|
|
17645
17645
|
const memory = {
|
|
@@ -17707,8 +17707,8 @@ function WebGLInfo( gl ) {
|
|
|
17707
17707
|
update: update
|
|
17708
17708
|
};
|
|
17709
17709
|
|
|
17710
|
-
}
|
|
17711
|
-
|
|
17710
|
+
}
|
|
17711
|
+
|
|
17712
17712
|
function numericalSort( a, b ) {
|
|
17713
17713
|
|
|
17714
17714
|
return a[ 0 ] - b[ 0 ];
|
|
@@ -18007,8 +18007,8 @@ function WebGLMorphtargets( gl, capabilities, textures ) {
|
|
|
18007
18007
|
|
|
18008
18008
|
};
|
|
18009
18009
|
|
|
18010
|
-
}
|
|
18011
|
-
|
|
18010
|
+
}
|
|
18011
|
+
|
|
18012
18012
|
function WebGLObjects( gl, geometries, attributes, info ) {
|
|
18013
18013
|
|
|
18014
18014
|
let updateMap = new WeakMap();
|
|
@@ -18097,8 +18097,8 @@ function WebGLObjects( gl, geometries, attributes, info ) {
|
|
|
18097
18097
|
|
|
18098
18098
|
};
|
|
18099
18099
|
|
|
18100
|
-
}
|
|
18101
|
-
|
|
18100
|
+
}
|
|
18101
|
+
|
|
18102
18102
|
class DepthTexture extends Texture {
|
|
18103
18103
|
|
|
18104
18104
|
constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {
|
|
@@ -18151,8 +18151,8 @@ class DepthTexture extends Texture {
|
|
|
18151
18151
|
|
|
18152
18152
|
}
|
|
18153
18153
|
|
|
18154
|
-
}
|
|
18155
|
-
|
|
18154
|
+
}
|
|
18155
|
+
|
|
18156
18156
|
/**
|
|
18157
18157
|
* Uniforms of a program.
|
|
18158
18158
|
* Those form a tree structure with a special top-level container for the root,
|
|
@@ -19300,8 +19300,8 @@ class WebGLUniforms {
|
|
|
19300
19300
|
|
|
19301
19301
|
}
|
|
19302
19302
|
|
|
19303
|
-
}
|
|
19304
|
-
|
|
19303
|
+
}
|
|
19304
|
+
|
|
19305
19305
|
function WebGLShader( gl, type, string ) {
|
|
19306
19306
|
|
|
19307
19307
|
const shader = gl.createShader( type );
|
|
@@ -19311,8 +19311,8 @@ function WebGLShader( gl, type, string ) {
|
|
|
19311
19311
|
|
|
19312
19312
|
return shader;
|
|
19313
19313
|
|
|
19314
|
-
}
|
|
19315
|
-
|
|
19314
|
+
}
|
|
19315
|
+
|
|
19316
19316
|
// From https://www.khronos.org/registry/webgl/extensions/KHR_parallel_shader_compile/
|
|
19317
19317
|
const COMPLETION_STATUS_KHR = 0x91B1;
|
|
19318
19318
|
|
|
@@ -20424,8 +20424,8 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
|
20424
20424
|
|
|
20425
20425
|
return this;
|
|
20426
20426
|
|
|
20427
|
-
}
|
|
20428
|
-
|
|
20427
|
+
}
|
|
20428
|
+
|
|
20429
20429
|
let _id$1 = 0;
|
|
20430
20430
|
|
|
20431
20431
|
class WebGLShaderCache {
|
|
@@ -20547,8 +20547,8 @@ class WebGLShaderStage {
|
|
|
20547
20547
|
|
|
20548
20548
|
}
|
|
20549
20549
|
|
|
20550
|
-
}
|
|
20551
|
-
|
|
20550
|
+
}
|
|
20551
|
+
|
|
20552
20552
|
function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping ) {
|
|
20553
20553
|
|
|
20554
20554
|
const _programLayers = new Layers();
|
|
@@ -21202,8 +21202,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
21202
21202
|
dispose: dispose
|
|
21203
21203
|
};
|
|
21204
21204
|
|
|
21205
|
-
}
|
|
21206
|
-
|
|
21205
|
+
}
|
|
21206
|
+
|
|
21207
21207
|
function WebGLProperties() {
|
|
21208
21208
|
|
|
21209
21209
|
let properties = new WeakMap();
|
|
@@ -21248,8 +21248,8 @@ function WebGLProperties() {
|
|
|
21248
21248
|
dispose: dispose
|
|
21249
21249
|
};
|
|
21250
21250
|
|
|
21251
|
-
}
|
|
21252
|
-
|
|
21251
|
+
}
|
|
21252
|
+
|
|
21253
21253
|
function painterSortStable( a, b ) {
|
|
21254
21254
|
|
|
21255
21255
|
if ( a.groupOrder !== b.groupOrder ) {
|
|
@@ -21484,8 +21484,8 @@ function WebGLRenderLists() {
|
|
|
21484
21484
|
dispose: dispose
|
|
21485
21485
|
};
|
|
21486
21486
|
|
|
21487
|
-
}
|
|
21488
|
-
|
|
21487
|
+
}
|
|
21488
|
+
|
|
21489
21489
|
function UniformsCache() {
|
|
21490
21490
|
|
|
21491
21491
|
const lights = {};
|
|
@@ -22066,8 +22066,8 @@ function WebGLLights( extensions, capabilities ) {
|
|
|
22066
22066
|
state: state
|
|
22067
22067
|
};
|
|
22068
22068
|
|
|
22069
|
-
}
|
|
22070
|
-
|
|
22069
|
+
}
|
|
22070
|
+
|
|
22071
22071
|
function WebGLRenderState( extensions, capabilities ) {
|
|
22072
22072
|
|
|
22073
22073
|
const lights = new WebGLLights( extensions, capabilities );
|
|
@@ -22169,8 +22169,8 @@ function WebGLRenderStates( extensions, capabilities ) {
|
|
|
22169
22169
|
dispose: dispose
|
|
22170
22170
|
};
|
|
22171
22171
|
|
|
22172
|
-
}
|
|
22173
|
-
|
|
22172
|
+
}
|
|
22173
|
+
|
|
22174
22174
|
class MeshDepthMaterial extends Material {
|
|
22175
22175
|
|
|
22176
22176
|
constructor( parameters ) {
|
|
@@ -22219,8 +22219,8 @@ class MeshDepthMaterial extends Material {
|
|
|
22219
22219
|
|
|
22220
22220
|
}
|
|
22221
22221
|
|
|
22222
|
-
}
|
|
22223
|
-
|
|
22222
|
+
}
|
|
22223
|
+
|
|
22224
22224
|
class MeshDistanceMaterial extends Material {
|
|
22225
22225
|
|
|
22226
22226
|
constructor( parameters ) {
|
|
@@ -22259,12 +22259,12 @@ class MeshDistanceMaterial extends Material {
|
|
|
22259
22259
|
|
|
22260
22260
|
}
|
|
22261
22261
|
|
|
22262
|
-
}
|
|
22263
|
-
|
|
22262
|
+
}
|
|
22263
|
+
|
|
22264
22264
|
const vertex = "void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";
|
|
22265
22265
|
|
|
22266
|
-
const fragment = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";
|
|
22267
|
-
|
|
22266
|
+
const fragment = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";
|
|
22267
|
+
|
|
22268
22268
|
function WebGLShadowMap( _renderer, _objects, _capabilities ) {
|
|
22269
22269
|
|
|
22270
22270
|
let _frustum = new Frustum();
|
|
@@ -22671,8 +22671,8 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
|
|
|
22671
22671
|
|
|
22672
22672
|
}
|
|
22673
22673
|
|
|
22674
|
-
}
|
|
22675
|
-
|
|
22674
|
+
}
|
|
22675
|
+
|
|
22676
22676
|
function WebGLState( gl, extensions, capabilities ) {
|
|
22677
22677
|
|
|
22678
22678
|
const isWebGL2 = capabilities.isWebGL2;
|
|
@@ -23984,8 +23984,8 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
23984
23984
|
|
|
23985
23985
|
};
|
|
23986
23986
|
|
|
23987
|
-
}
|
|
23988
|
-
|
|
23987
|
+
}
|
|
23988
|
+
|
|
23989
23989
|
function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) {
|
|
23990
23990
|
|
|
23991
23991
|
const isWebGL2 = capabilities.isWebGL2;
|
|
@@ -26189,8 +26189,8 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
26189
26189
|
this.setupFrameBufferTexture = setupFrameBufferTexture;
|
|
26190
26190
|
this.useMultisampledRTT = useMultisampledRTT;
|
|
26191
26191
|
|
|
26192
|
-
}
|
|
26193
|
-
|
|
26192
|
+
}
|
|
26193
|
+
|
|
26194
26194
|
function WebGLUtils( gl, extensions, capabilities ) {
|
|
26195
26195
|
|
|
26196
26196
|
const isWebGL2 = capabilities.isWebGL2;
|
|
@@ -26467,8 +26467,8 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
26467
26467
|
|
|
26468
26468
|
return { convert: convert };
|
|
26469
26469
|
|
|
26470
|
-
}
|
|
26471
|
-
|
|
26470
|
+
}
|
|
26471
|
+
|
|
26472
26472
|
class ArrayCamera extends PerspectiveCamera {
|
|
26473
26473
|
|
|
26474
26474
|
constructor( array = [] ) {
|
|
@@ -26481,8 +26481,8 @@ class ArrayCamera extends PerspectiveCamera {
|
|
|
26481
26481
|
|
|
26482
26482
|
}
|
|
26483
26483
|
|
|
26484
|
-
}
|
|
26485
|
-
|
|
26484
|
+
}
|
|
26485
|
+
|
|
26486
26486
|
class Group extends Object3D {
|
|
26487
26487
|
|
|
26488
26488
|
constructor() {
|
|
@@ -26495,8 +26495,8 @@ class Group extends Object3D {
|
|
|
26495
26495
|
|
|
26496
26496
|
}
|
|
26497
26497
|
|
|
26498
|
-
}
|
|
26499
|
-
|
|
26498
|
+
}
|
|
26499
|
+
|
|
26500
26500
|
const _moveEvent = { type: 'move' };
|
|
26501
26501
|
|
|
26502
26502
|
class WebXRController {
|
|
@@ -26833,8 +26833,8 @@ class WebXRController {
|
|
|
26833
26833
|
|
|
26834
26834
|
}
|
|
26835
26835
|
|
|
26836
|
-
}
|
|
26837
|
-
|
|
26836
|
+
}
|
|
26837
|
+
|
|
26838
26838
|
const _occlusion_vertex = `
|
|
26839
26839
|
void main() {
|
|
26840
26840
|
|
|
@@ -26932,8 +26932,8 @@ class WebXRDepthSensing {
|
|
|
26932
26932
|
|
|
26933
26933
|
}
|
|
26934
26934
|
|
|
26935
|
-
}
|
|
26936
|
-
|
|
26935
|
+
}
|
|
26936
|
+
|
|
26937
26937
|
class WebXRManager extends EventDispatcher {
|
|
26938
26938
|
|
|
26939
26939
|
constructor( renderer, gl ) {
|
|
@@ -26996,6 +26996,8 @@ class WebXRManager extends EventDispatcher {
|
|
|
26996
26996
|
|
|
26997
26997
|
this.isPresenting = false;
|
|
26998
26998
|
|
|
26999
|
+
this.controllerAutoUpdate = true;
|
|
27000
|
+
|
|
26999
27001
|
this.getController = function ( index ) {
|
|
27000
27002
|
|
|
27001
27003
|
let controller = controllers[ index ];
|
|
@@ -27083,7 +27085,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
27083
27085
|
|
|
27084
27086
|
controllerInputSources[ i ] = null;
|
|
27085
27087
|
|
|
27086
|
-
controllers[ i ]
|
|
27088
|
+
controllers[ i ]?.disconnect( inputSource );
|
|
27087
27089
|
|
|
27088
27090
|
}
|
|
27089
27091
|
|
|
@@ -27315,7 +27317,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
27315
27317
|
if ( index >= 0 ) {
|
|
27316
27318
|
|
|
27317
27319
|
controllerInputSources[ index ] = null;
|
|
27318
|
-
controllers[ index ]
|
|
27320
|
+
controllers[ index ]?.disconnect( inputSource );
|
|
27319
27321
|
|
|
27320
27322
|
}
|
|
27321
27323
|
|
|
@@ -27700,15 +27702,19 @@ class WebXRManager extends EventDispatcher {
|
|
|
27700
27702
|
|
|
27701
27703
|
//
|
|
27702
27704
|
|
|
27703
|
-
|
|
27704
|
-
|
|
27705
|
-
const inputSource = controllerInputSources[ i ];
|
|
27706
|
-
const controller = controllers[ i ];
|
|
27705
|
+
if ( scope.controllerAutoUpdate ) {
|
|
27707
27706
|
|
|
27708
|
-
|
|
27709
|
-
|
|
27710
|
-
controller.update( inputSource, frame, customReferenceSpace || referenceSpace );
|
|
27707
|
+
for ( let i = 0; i < controllers.length; i ++ ) {
|
|
27711
27708
|
|
|
27709
|
+
const inputSource = controllerInputSources[ i ];
|
|
27710
|
+
const controller = controllers[ i ];
|
|
27711
|
+
|
|
27712
|
+
if ( inputSource !== null && controller !== undefined ) {
|
|
27713
|
+
|
|
27714
|
+
controller.update( inputSource, frame, customReferenceSpace || referenceSpace );
|
|
27715
|
+
|
|
27716
|
+
}
|
|
27717
|
+
|
|
27712
27718
|
}
|
|
27713
27719
|
|
|
27714
27720
|
}
|
|
@@ -27741,8 +27747,8 @@ class WebXRManager extends EventDispatcher {
|
|
|
27741
27747
|
|
|
27742
27748
|
}
|
|
27743
27749
|
|
|
27744
|
-
}
|
|
27745
|
-
|
|
27750
|
+
}
|
|
27751
|
+
|
|
27746
27752
|
const _e1 = /*@__PURE__*/ new Euler();
|
|
27747
27753
|
const _m1 = /*@__PURE__*/ new Matrix4();
|
|
27748
27754
|
|
|
@@ -28325,8 +28331,8 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
28325
28331
|
refreshMaterialUniforms: refreshMaterialUniforms
|
|
28326
28332
|
};
|
|
28327
28333
|
|
|
28328
|
-
}
|
|
28329
|
-
|
|
28334
|
+
}
|
|
28335
|
+
|
|
28330
28336
|
function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
28331
28337
|
|
|
28332
28338
|
let buffers = {};
|
|
@@ -28715,8 +28721,8 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
28715
28721
|
|
|
28716
28722
|
};
|
|
28717
28723
|
|
|
28718
|
-
}
|
|
28719
|
-
|
|
28724
|
+
}
|
|
28725
|
+
|
|
28720
28726
|
class WebGLRenderer {
|
|
28721
28727
|
|
|
28722
28728
|
constructor( parameters = {} ) {
|
|
@@ -31263,12 +31269,12 @@ class WebGLRenderer {
|
|
|
31263
31269
|
|
|
31264
31270
|
}
|
|
31265
31271
|
|
|
31266
|
-
}
|
|
31267
|
-
|
|
31272
|
+
}
|
|
31273
|
+
|
|
31268
31274
|
class WebGL1Renderer extends WebGLRenderer {}
|
|
31269
31275
|
|
|
31270
|
-
WebGL1Renderer.prototype.isWebGL1Renderer = true;
|
|
31271
|
-
|
|
31276
|
+
WebGL1Renderer.prototype.isWebGL1Renderer = true;
|
|
31277
|
+
|
|
31272
31278
|
class FogExp2 {
|
|
31273
31279
|
|
|
31274
31280
|
constructor( color, density = 0.00025 ) {
|
|
@@ -31299,8 +31305,8 @@ class FogExp2 {
|
|
|
31299
31305
|
|
|
31300
31306
|
}
|
|
31301
31307
|
|
|
31302
|
-
}
|
|
31303
|
-
|
|
31308
|
+
}
|
|
31309
|
+
|
|
31304
31310
|
class Fog {
|
|
31305
31311
|
|
|
31306
31312
|
constructor( color, near = 1, far = 1000 ) {
|
|
@@ -31334,8 +31340,8 @@ class Fog {
|
|
|
31334
31340
|
|
|
31335
31341
|
}
|
|
31336
31342
|
|
|
31337
|
-
}
|
|
31338
|
-
|
|
31343
|
+
}
|
|
31344
|
+
|
|
31339
31345
|
class Scene extends Object3D {
|
|
31340
31346
|
|
|
31341
31347
|
constructor() {
|
|
@@ -31401,8 +31407,8 @@ class Scene extends Object3D {
|
|
|
31401
31407
|
|
|
31402
31408
|
}
|
|
31403
31409
|
|
|
31404
|
-
}
|
|
31405
|
-
|
|
31410
|
+
}
|
|
31411
|
+
|
|
31406
31412
|
class InterleavedBuffer {
|
|
31407
31413
|
|
|
31408
31414
|
constructor( array, stride ) {
|
|
@@ -31562,8 +31568,8 @@ class InterleavedBuffer {
|
|
|
31562
31568
|
|
|
31563
31569
|
}
|
|
31564
31570
|
|
|
31565
|
-
}
|
|
31566
|
-
|
|
31571
|
+
}
|
|
31572
|
+
|
|
31567
31573
|
const _vector$6 = /*@__PURE__*/ new Vector3();
|
|
31568
31574
|
|
|
31569
31575
|
class InterleavedBufferAttribute {
|
|
@@ -31907,8 +31913,8 @@ class InterleavedBufferAttribute {
|
|
|
31907
31913
|
|
|
31908
31914
|
}
|
|
31909
31915
|
|
|
31910
|
-
}
|
|
31911
|
-
|
|
31916
|
+
}
|
|
31917
|
+
|
|
31912
31918
|
class SpriteMaterial extends Material {
|
|
31913
31919
|
|
|
31914
31920
|
constructor( parameters ) {
|
|
@@ -31957,8 +31963,8 @@ class SpriteMaterial extends Material {
|
|
|
31957
31963
|
|
|
31958
31964
|
}
|
|
31959
31965
|
|
|
31960
|
-
}
|
|
31961
|
-
|
|
31966
|
+
}
|
|
31967
|
+
|
|
31962
31968
|
let _geometry;
|
|
31963
31969
|
|
|
31964
31970
|
const _intersectPoint = /*@__PURE__*/ new Vector3();
|
|
@@ -32127,8 +32133,8 @@ function transformVertex( vertexPosition, mvPosition, center, scale, sin, cos )
|
|
|
32127
32133
|
// transform to world space
|
|
32128
32134
|
vertexPosition.applyMatrix4( _viewWorldMatrix );
|
|
32129
32135
|
|
|
32130
|
-
}
|
|
32131
|
-
|
|
32136
|
+
}
|
|
32137
|
+
|
|
32132
32138
|
const _v1$2 = /*@__PURE__*/ new Vector3();
|
|
32133
32139
|
const _v2$1 = /*@__PURE__*/ new Vector3();
|
|
32134
32140
|
|
|
@@ -32336,8 +32342,8 @@ class LOD extends Object3D {
|
|
|
32336
32342
|
|
|
32337
32343
|
}
|
|
32338
32344
|
|
|
32339
|
-
}
|
|
32340
|
-
|
|
32345
|
+
}
|
|
32346
|
+
|
|
32341
32347
|
const _basePosition = /*@__PURE__*/ new Vector3();
|
|
32342
32348
|
|
|
32343
32349
|
const _skinIndex = /*@__PURE__*/ new Vector4();
|
|
@@ -32583,8 +32589,8 @@ class SkinnedMesh extends Mesh {
|
|
|
32583
32589
|
|
|
32584
32590
|
}
|
|
32585
32591
|
|
|
32586
|
-
}
|
|
32587
|
-
|
|
32592
|
+
}
|
|
32593
|
+
|
|
32588
32594
|
class Bone extends Object3D {
|
|
32589
32595
|
|
|
32590
32596
|
constructor() {
|
|
@@ -32597,8 +32603,8 @@ class Bone extends Object3D {
|
|
|
32597
32603
|
|
|
32598
32604
|
}
|
|
32599
32605
|
|
|
32600
|
-
}
|
|
32601
|
-
|
|
32606
|
+
}
|
|
32607
|
+
|
|
32602
32608
|
class DataTexture extends Texture {
|
|
32603
32609
|
|
|
32604
32610
|
constructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, colorSpace ) {
|
|
@@ -32615,8 +32621,8 @@ class DataTexture extends Texture {
|
|
|
32615
32621
|
|
|
32616
32622
|
}
|
|
32617
32623
|
|
|
32618
|
-
}
|
|
32619
|
-
|
|
32624
|
+
}
|
|
32625
|
+
|
|
32620
32626
|
const _offsetMatrix = /*@__PURE__*/ new Matrix4();
|
|
32621
32627
|
const _identityMatrix$1 = /*@__PURE__*/ new Matrix4();
|
|
32622
32628
|
|
|
@@ -32882,8 +32888,8 @@ class Skeleton {
|
|
|
32882
32888
|
|
|
32883
32889
|
}
|
|
32884
32890
|
|
|
32885
|
-
}
|
|
32886
|
-
|
|
32891
|
+
}
|
|
32892
|
+
|
|
32887
32893
|
class InstancedBufferAttribute extends BufferAttribute {
|
|
32888
32894
|
|
|
32889
32895
|
constructor( array, itemSize, normalized, meshPerAttribute = 1 ) {
|
|
@@ -32918,8 +32924,8 @@ class InstancedBufferAttribute extends BufferAttribute {
|
|
|
32918
32924
|
|
|
32919
32925
|
}
|
|
32920
32926
|
|
|
32921
|
-
}
|
|
32922
|
-
|
|
32927
|
+
}
|
|
32928
|
+
|
|
32923
32929
|
const _instanceLocalMatrix = /*@__PURE__*/ new Matrix4();
|
|
32924
32930
|
const _instanceWorldMatrix = /*@__PURE__*/ new Matrix4();
|
|
32925
32931
|
|
|
@@ -33176,8 +33182,8 @@ class InstancedMesh extends Mesh {
|
|
|
33176
33182
|
|
|
33177
33183
|
}
|
|
33178
33184
|
|
|
33179
|
-
}
|
|
33180
|
-
|
|
33185
|
+
}
|
|
33186
|
+
|
|
33181
33187
|
function sortOpaque( a, b ) {
|
|
33182
33188
|
|
|
33183
33189
|
return a.z - b.z;
|
|
@@ -34183,8 +34189,8 @@ class BatchedMesh extends Mesh {
|
|
|
34183
34189
|
|
|
34184
34190
|
}
|
|
34185
34191
|
|
|
34186
|
-
}
|
|
34187
|
-
|
|
34192
|
+
}
|
|
34193
|
+
|
|
34188
34194
|
class LineBasicMaterial extends Material {
|
|
34189
34195
|
|
|
34190
34196
|
constructor( parameters ) {
|
|
@@ -34228,8 +34234,8 @@ class LineBasicMaterial extends Material {
|
|
|
34228
34234
|
|
|
34229
34235
|
}
|
|
34230
34236
|
|
|
34231
|
-
}
|
|
34232
|
-
|
|
34237
|
+
}
|
|
34238
|
+
|
|
34233
34239
|
const _start$1 = /*@__PURE__*/ new Vector3();
|
|
34234
34240
|
const _end$1 = /*@__PURE__*/ new Vector3();
|
|
34235
34241
|
const _inverseMatrix$1 = /*@__PURE__*/ new Matrix4();
|
|
@@ -34440,8 +34446,8 @@ class Line extends Object3D {
|
|
|
34440
34446
|
|
|
34441
34447
|
}
|
|
34442
34448
|
|
|
34443
|
-
}
|
|
34444
|
-
|
|
34449
|
+
}
|
|
34450
|
+
|
|
34445
34451
|
const _start = /*@__PURE__*/ new Vector3();
|
|
34446
34452
|
const _end = /*@__PURE__*/ new Vector3();
|
|
34447
34453
|
|
|
@@ -34490,8 +34496,8 @@ class LineSegments extends Line {
|
|
|
34490
34496
|
|
|
34491
34497
|
}
|
|
34492
34498
|
|
|
34493
|
-
}
|
|
34494
|
-
|
|
34499
|
+
}
|
|
34500
|
+
|
|
34495
34501
|
class LineLoop extends Line {
|
|
34496
34502
|
|
|
34497
34503
|
constructor( geometry, material ) {
|
|
@@ -34504,8 +34510,8 @@ class LineLoop extends Line {
|
|
|
34504
34510
|
|
|
34505
34511
|
}
|
|
34506
34512
|
|
|
34507
|
-
}
|
|
34508
|
-
|
|
34513
|
+
}
|
|
34514
|
+
|
|
34509
34515
|
class PointsMaterial extends Material {
|
|
34510
34516
|
|
|
34511
34517
|
constructor( parameters ) {
|
|
@@ -34550,8 +34556,8 @@ class PointsMaterial extends Material {
|
|
|
34550
34556
|
|
|
34551
34557
|
}
|
|
34552
34558
|
|
|
34553
|
-
}
|
|
34554
|
-
|
|
34559
|
+
}
|
|
34560
|
+
|
|
34555
34561
|
const _inverseMatrix = /*@__PURE__*/ new Matrix4();
|
|
34556
34562
|
const _ray = /*@__PURE__*/ new Ray();
|
|
34557
34563
|
const _sphere = /*@__PURE__*/ new Sphere();
|
|
@@ -34707,8 +34713,8 @@ function testPoint( point, index, localThresholdSq, matrixWorld, raycaster, inte
|
|
|
34707
34713
|
|
|
34708
34714
|
}
|
|
34709
34715
|
|
|
34710
|
-
}
|
|
34711
|
-
|
|
34716
|
+
}
|
|
34717
|
+
|
|
34712
34718
|
class VideoTexture extends Texture {
|
|
34713
34719
|
|
|
34714
34720
|
constructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
|
|
@@ -34758,8 +34764,8 @@ class VideoTexture extends Texture {
|
|
|
34758
34764
|
|
|
34759
34765
|
}
|
|
34760
34766
|
|
|
34761
|
-
}
|
|
34762
|
-
|
|
34767
|
+
}
|
|
34768
|
+
|
|
34763
34769
|
class FramebufferTexture extends Texture {
|
|
34764
34770
|
|
|
34765
34771
|
constructor( width, height ) {
|
|
@@ -34777,8 +34783,8 @@ class FramebufferTexture extends Texture {
|
|
|
34777
34783
|
|
|
34778
34784
|
}
|
|
34779
34785
|
|
|
34780
|
-
}
|
|
34781
|
-
|
|
34786
|
+
}
|
|
34787
|
+
|
|
34782
34788
|
class CompressedTexture extends Texture {
|
|
34783
34789
|
|
|
34784
34790
|
constructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace ) {
|
|
@@ -34802,8 +34808,8 @@ class CompressedTexture extends Texture {
|
|
|
34802
34808
|
|
|
34803
34809
|
}
|
|
34804
34810
|
|
|
34805
|
-
}
|
|
34806
|
-
|
|
34811
|
+
}
|
|
34812
|
+
|
|
34807
34813
|
class CompressedArrayTexture extends CompressedTexture {
|
|
34808
34814
|
|
|
34809
34815
|
constructor( mipmaps, width, height, depth, format, type ) {
|
|
@@ -34816,8 +34822,8 @@ class CompressedArrayTexture extends CompressedTexture {
|
|
|
34816
34822
|
|
|
34817
34823
|
}
|
|
34818
34824
|
|
|
34819
|
-
}
|
|
34820
|
-
|
|
34825
|
+
}
|
|
34826
|
+
|
|
34821
34827
|
class CompressedCubeTexture extends CompressedTexture {
|
|
34822
34828
|
|
|
34823
34829
|
constructor( images, format, type ) {
|
|
@@ -34831,8 +34837,8 @@ class CompressedCubeTexture extends CompressedTexture {
|
|
|
34831
34837
|
|
|
34832
34838
|
}
|
|
34833
34839
|
|
|
34834
|
-
}
|
|
34835
|
-
|
|
34840
|
+
}
|
|
34841
|
+
|
|
34836
34842
|
class CanvasTexture extends Texture {
|
|
34837
34843
|
|
|
34838
34844
|
constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
|
|
@@ -34845,8 +34851,8 @@ class CanvasTexture extends Texture {
|
|
|
34845
34851
|
|
|
34846
34852
|
}
|
|
34847
34853
|
|
|
34848
|
-
}
|
|
34849
|
-
|
|
34854
|
+
}
|
|
34855
|
+
|
|
34850
34856
|
/**
|
|
34851
34857
|
* Extensible curve object.
|
|
34852
34858
|
*
|
|
@@ -35254,8 +35260,8 @@ class Curve {
|
|
|
35254
35260
|
|
|
35255
35261
|
}
|
|
35256
35262
|
|
|
35257
|
-
}
|
|
35258
|
-
|
|
35263
|
+
}
|
|
35264
|
+
|
|
35259
35265
|
class EllipseCurve extends Curve {
|
|
35260
35266
|
|
|
35261
35267
|
constructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) {
|
|
@@ -35406,8 +35412,8 @@ class EllipseCurve extends Curve {
|
|
|
35406
35412
|
|
|
35407
35413
|
}
|
|
35408
35414
|
|
|
35409
|
-
}
|
|
35410
|
-
|
|
35415
|
+
}
|
|
35416
|
+
|
|
35411
35417
|
class ArcCurve extends EllipseCurve {
|
|
35412
35418
|
|
|
35413
35419
|
constructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {
|
|
@@ -35420,8 +35426,8 @@ class ArcCurve extends EllipseCurve {
|
|
|
35420
35426
|
|
|
35421
35427
|
}
|
|
35422
35428
|
|
|
35423
|
-
}
|
|
35424
|
-
|
|
35429
|
+
}
|
|
35430
|
+
|
|
35425
35431
|
/**
|
|
35426
35432
|
* Centripetal CatmullRom Curve - which is useful for avoiding
|
|
35427
35433
|
* cusps and self-intersections in non-uniform catmull rom curves.
|
|
@@ -35671,8 +35677,8 @@ class CatmullRomCurve3 extends Curve {
|
|
|
35671
35677
|
|
|
35672
35678
|
}
|
|
35673
35679
|
|
|
35674
|
-
}
|
|
35675
|
-
|
|
35680
|
+
}
|
|
35681
|
+
|
|
35676
35682
|
/**
|
|
35677
35683
|
* Bezier Curves formulas obtained from
|
|
35678
35684
|
* https://en.wikipedia.org/wiki/B%C3%A9zier_curve
|
|
@@ -35749,8 +35755,8 @@ function CubicBezier( t, p0, p1, p2, p3 ) {
|
|
|
35749
35755
|
return CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) +
|
|
35750
35756
|
CubicBezierP3( t, p3 );
|
|
35751
35757
|
|
|
35752
|
-
}
|
|
35753
|
-
|
|
35758
|
+
}
|
|
35759
|
+
|
|
35754
35760
|
class CubicBezierCurve extends Curve {
|
|
35755
35761
|
|
|
35756
35762
|
constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) {
|
|
@@ -35822,8 +35828,8 @@ class CubicBezierCurve extends Curve {
|
|
|
35822
35828
|
|
|
35823
35829
|
}
|
|
35824
35830
|
|
|
35825
|
-
}
|
|
35826
|
-
|
|
35831
|
+
}
|
|
35832
|
+
|
|
35827
35833
|
class CubicBezierCurve3 extends Curve {
|
|
35828
35834
|
|
|
35829
35835
|
constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) {
|
|
@@ -35896,8 +35902,8 @@ class CubicBezierCurve3 extends Curve {
|
|
|
35896
35902
|
|
|
35897
35903
|
}
|
|
35898
35904
|
|
|
35899
|
-
}
|
|
35900
|
-
|
|
35905
|
+
}
|
|
35906
|
+
|
|
35901
35907
|
class LineCurve extends Curve {
|
|
35902
35908
|
|
|
35903
35909
|
constructor( v1 = new Vector2(), v2 = new Vector2() ) {
|
|
@@ -35984,8 +35990,8 @@ class LineCurve extends Curve {
|
|
|
35984
35990
|
|
|
35985
35991
|
}
|
|
35986
35992
|
|
|
35987
|
-
}
|
|
35988
|
-
|
|
35993
|
+
}
|
|
35994
|
+
|
|
35989
35995
|
class LineCurve3 extends Curve {
|
|
35990
35996
|
|
|
35991
35997
|
constructor( v1 = new Vector3(), v2 = new Vector3() ) {
|
|
@@ -36072,8 +36078,8 @@ class LineCurve3 extends Curve {
|
|
|
36072
36078
|
|
|
36073
36079
|
}
|
|
36074
36080
|
|
|
36075
|
-
}
|
|
36076
|
-
|
|
36081
|
+
}
|
|
36082
|
+
|
|
36077
36083
|
class QuadraticBezierCurve extends Curve {
|
|
36078
36084
|
|
|
36079
36085
|
constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) {
|
|
@@ -36141,8 +36147,8 @@ class QuadraticBezierCurve extends Curve {
|
|
|
36141
36147
|
|
|
36142
36148
|
}
|
|
36143
36149
|
|
|
36144
|
-
}
|
|
36145
|
-
|
|
36150
|
+
}
|
|
36151
|
+
|
|
36146
36152
|
class QuadraticBezierCurve3 extends Curve {
|
|
36147
36153
|
|
|
36148
36154
|
constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) {
|
|
@@ -36211,8 +36217,8 @@ class QuadraticBezierCurve3 extends Curve {
|
|
|
36211
36217
|
|
|
36212
36218
|
}
|
|
36213
36219
|
|
|
36214
|
-
}
|
|
36215
|
-
|
|
36220
|
+
}
|
|
36221
|
+
|
|
36216
36222
|
class SplineCurve extends Curve {
|
|
36217
36223
|
|
|
36218
36224
|
constructor( points = [] ) {
|
|
@@ -36303,22 +36309,22 @@ class SplineCurve extends Curve {
|
|
|
36303
36309
|
|
|
36304
36310
|
}
|
|
36305
36311
|
|
|
36306
|
-
}
|
|
36307
|
-
|
|
36308
|
-
var Curves = /*#__PURE__*/Object.freeze({
|
|
36309
|
-
__proto__: null,
|
|
36310
|
-
ArcCurve: ArcCurve,
|
|
36311
|
-
CatmullRomCurve3: CatmullRomCurve3,
|
|
36312
|
-
CubicBezierCurve: CubicBezierCurve,
|
|
36313
|
-
CubicBezierCurve3: CubicBezierCurve3,
|
|
36314
|
-
EllipseCurve: EllipseCurve,
|
|
36315
|
-
LineCurve: LineCurve,
|
|
36316
|
-
LineCurve3: LineCurve3,
|
|
36317
|
-
QuadraticBezierCurve: QuadraticBezierCurve,
|
|
36318
|
-
QuadraticBezierCurve3: QuadraticBezierCurve3,
|
|
36319
|
-
SplineCurve: SplineCurve
|
|
36320
|
-
});
|
|
36321
|
-
|
|
36312
|
+
}
|
|
36313
|
+
|
|
36314
|
+
var Curves = /*#__PURE__*/Object.freeze({
|
|
36315
|
+
__proto__: null,
|
|
36316
|
+
ArcCurve: ArcCurve,
|
|
36317
|
+
CatmullRomCurve3: CatmullRomCurve3,
|
|
36318
|
+
CubicBezierCurve: CubicBezierCurve,
|
|
36319
|
+
CubicBezierCurve3: CubicBezierCurve3,
|
|
36320
|
+
EllipseCurve: EllipseCurve,
|
|
36321
|
+
LineCurve: LineCurve,
|
|
36322
|
+
LineCurve3: LineCurve3,
|
|
36323
|
+
QuadraticBezierCurve: QuadraticBezierCurve,
|
|
36324
|
+
QuadraticBezierCurve3: QuadraticBezierCurve3,
|
|
36325
|
+
SplineCurve: SplineCurve
|
|
36326
|
+
});
|
|
36327
|
+
|
|
36322
36328
|
/**************************************************************
|
|
36323
36329
|
* Curved Path - a curve path is simply a array of connected
|
|
36324
36330
|
* curves, but retains the api of a curve
|
|
@@ -36567,8 +36573,8 @@ class CurvePath extends Curve {
|
|
|
36567
36573
|
|
|
36568
36574
|
}
|
|
36569
36575
|
|
|
36570
|
-
}
|
|
36571
|
-
|
|
36576
|
+
}
|
|
36577
|
+
|
|
36572
36578
|
class Path extends CurvePath {
|
|
36573
36579
|
|
|
36574
36580
|
constructor( points ) {
|
|
@@ -36753,8 +36759,8 @@ class Path extends CurvePath {
|
|
|
36753
36759
|
|
|
36754
36760
|
}
|
|
36755
36761
|
|
|
36756
|
-
}
|
|
36757
|
-
|
|
36762
|
+
}
|
|
36763
|
+
|
|
36758
36764
|
class LatheGeometry extends BufferGeometry {
|
|
36759
36765
|
|
|
36760
36766
|
constructor( points = [ new Vector2( 0, - 0.5 ), new Vector2( 0.5, 0 ), new Vector2( 0, 0.5 ) ], segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) {
|
|
@@ -36934,8 +36940,8 @@ class LatheGeometry extends BufferGeometry {
|
|
|
36934
36940
|
|
|
36935
36941
|
}
|
|
36936
36942
|
|
|
36937
|
-
}
|
|
36938
|
-
|
|
36943
|
+
}
|
|
36944
|
+
|
|
36939
36945
|
class CapsuleGeometry extends LatheGeometry {
|
|
36940
36946
|
|
|
36941
36947
|
constructor( radius = 1, length = 1, capSegments = 4, radialSegments = 8 ) {
|
|
@@ -36963,8 +36969,8 @@ class CapsuleGeometry extends LatheGeometry {
|
|
|
36963
36969
|
|
|
36964
36970
|
}
|
|
36965
36971
|
|
|
36966
|
-
}
|
|
36967
|
-
|
|
36972
|
+
}
|
|
36973
|
+
|
|
36968
36974
|
class CircleGeometry extends BufferGeometry {
|
|
36969
36975
|
|
|
36970
36976
|
constructor( radius = 1, segments = 32, thetaStart = 0, thetaLength = Math.PI * 2 ) {
|
|
@@ -37057,8 +37063,8 @@ class CircleGeometry extends BufferGeometry {
|
|
|
37057
37063
|
|
|
37058
37064
|
}
|
|
37059
37065
|
|
|
37060
|
-
}
|
|
37061
|
-
|
|
37066
|
+
}
|
|
37067
|
+
|
|
37062
37068
|
class CylinderGeometry extends BufferGeometry {
|
|
37063
37069
|
|
|
37064
37070
|
constructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {
|
|
@@ -37336,8 +37342,8 @@ class CylinderGeometry extends BufferGeometry {
|
|
|
37336
37342
|
|
|
37337
37343
|
}
|
|
37338
37344
|
|
|
37339
|
-
}
|
|
37340
|
-
|
|
37345
|
+
}
|
|
37346
|
+
|
|
37341
37347
|
class ConeGeometry extends CylinderGeometry {
|
|
37342
37348
|
|
|
37343
37349
|
constructor( radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {
|
|
@@ -37364,8 +37370,8 @@ class ConeGeometry extends CylinderGeometry {
|
|
|
37364
37370
|
|
|
37365
37371
|
}
|
|
37366
37372
|
|
|
37367
|
-
}
|
|
37368
|
-
|
|
37373
|
+
}
|
|
37374
|
+
|
|
37369
37375
|
class PolyhedronGeometry extends BufferGeometry {
|
|
37370
37376
|
|
|
37371
37377
|
constructor( vertices = [], indices = [], radius = 1, detail = 0 ) {
|
|
@@ -37677,8 +37683,8 @@ class PolyhedronGeometry extends BufferGeometry {
|
|
|
37677
37683
|
|
|
37678
37684
|
}
|
|
37679
37685
|
|
|
37680
|
-
}
|
|
37681
|
-
|
|
37686
|
+
}
|
|
37687
|
+
|
|
37682
37688
|
class DodecahedronGeometry extends PolyhedronGeometry {
|
|
37683
37689
|
|
|
37684
37690
|
constructor( radius = 1, detail = 0 ) {
|
|
@@ -37739,8 +37745,8 @@ class DodecahedronGeometry extends PolyhedronGeometry {
|
|
|
37739
37745
|
|
|
37740
37746
|
}
|
|
37741
37747
|
|
|
37742
|
-
}
|
|
37743
|
-
|
|
37748
|
+
}
|
|
37749
|
+
|
|
37744
37750
|
const _v0 = /*@__PURE__*/ new Vector3();
|
|
37745
37751
|
const _v1$1 = /*@__PURE__*/ new Vector3();
|
|
37746
37752
|
const _normal = /*@__PURE__*/ new Vector3();
|
|
@@ -37884,8 +37890,8 @@ class EdgesGeometry extends BufferGeometry {
|
|
|
37884
37890
|
|
|
37885
37891
|
}
|
|
37886
37892
|
|
|
37887
|
-
}
|
|
37888
|
-
|
|
37893
|
+
}
|
|
37894
|
+
|
|
37889
37895
|
class Shape extends Path {
|
|
37890
37896
|
|
|
37891
37897
|
constructor( points ) {
|
|
@@ -37981,8 +37987,8 @@ class Shape extends Path {
|
|
|
37981
37987
|
|
|
37982
37988
|
}
|
|
37983
37989
|
|
|
37984
|
-
}
|
|
37985
|
-
|
|
37990
|
+
}
|
|
37991
|
+
|
|
37986
37992
|
/**
|
|
37987
37993
|
* Port from https://github.com/mapbox/earcut (v2.2.4)
|
|
37988
37994
|
*/
|
|
@@ -38769,8 +38775,8 @@ function signedArea( data, start, end, dim ) {
|
|
|
38769
38775
|
|
|
38770
38776
|
return sum;
|
|
38771
38777
|
|
|
38772
|
-
}
|
|
38773
|
-
|
|
38778
|
+
}
|
|
38779
|
+
|
|
38774
38780
|
class ShapeUtils {
|
|
38775
38781
|
|
|
38776
38782
|
// calculate area of the contour polygon
|
|
@@ -38858,8 +38864,8 @@ function addContour( vertices, contour ) {
|
|
|
38858
38864
|
|
|
38859
38865
|
}
|
|
38860
38866
|
|
|
38861
|
-
}
|
|
38862
|
-
|
|
38867
|
+
}
|
|
38868
|
+
|
|
38863
38869
|
/**
|
|
38864
38870
|
* Creates extruded geometry from a path shape.
|
|
38865
38871
|
*
|
|
@@ -39663,8 +39669,8 @@ function toJSON$1( shapes, options, data ) {
|
|
|
39663
39669
|
|
|
39664
39670
|
return data;
|
|
39665
39671
|
|
|
39666
|
-
}
|
|
39667
|
-
|
|
39672
|
+
}
|
|
39673
|
+
|
|
39668
39674
|
class IcosahedronGeometry extends PolyhedronGeometry {
|
|
39669
39675
|
|
|
39670
39676
|
constructor( radius = 1, detail = 0 ) {
|
|
@@ -39701,8 +39707,8 @@ class IcosahedronGeometry extends PolyhedronGeometry {
|
|
|
39701
39707
|
|
|
39702
39708
|
}
|
|
39703
39709
|
|
|
39704
|
-
}
|
|
39705
|
-
|
|
39710
|
+
}
|
|
39711
|
+
|
|
39706
39712
|
class OctahedronGeometry extends PolyhedronGeometry {
|
|
39707
39713
|
|
|
39708
39714
|
constructor( radius = 1, detail = 0 ) {
|
|
@@ -39735,8 +39741,8 @@ class OctahedronGeometry extends PolyhedronGeometry {
|
|
|
39735
39741
|
|
|
39736
39742
|
}
|
|
39737
39743
|
|
|
39738
|
-
}
|
|
39739
|
-
|
|
39744
|
+
}
|
|
39745
|
+
|
|
39740
39746
|
class RingGeometry extends BufferGeometry {
|
|
39741
39747
|
|
|
39742
39748
|
constructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) {
|
|
@@ -39856,8 +39862,8 @@ class RingGeometry extends BufferGeometry {
|
|
|
39856
39862
|
|
|
39857
39863
|
}
|
|
39858
39864
|
|
|
39859
|
-
}
|
|
39860
|
-
|
|
39865
|
+
}
|
|
39866
|
+
|
|
39861
39867
|
class ShapeGeometry extends BufferGeometry {
|
|
39862
39868
|
|
|
39863
39869
|
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), curveSegments = 12 ) {
|
|
@@ -40044,8 +40050,8 @@ function toJSON( shapes, data ) {
|
|
|
40044
40050
|
|
|
40045
40051
|
return data;
|
|
40046
40052
|
|
|
40047
|
-
}
|
|
40048
|
-
|
|
40053
|
+
}
|
|
40054
|
+
|
|
40049
40055
|
class SphereGeometry extends BufferGeometry {
|
|
40050
40056
|
|
|
40051
40057
|
constructor( radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) {
|
|
@@ -40176,8 +40182,8 @@ class SphereGeometry extends BufferGeometry {
|
|
|
40176
40182
|
|
|
40177
40183
|
}
|
|
40178
40184
|
|
|
40179
|
-
}
|
|
40180
|
-
|
|
40185
|
+
}
|
|
40186
|
+
|
|
40181
40187
|
class TetrahedronGeometry extends PolyhedronGeometry {
|
|
40182
40188
|
|
|
40183
40189
|
constructor( radius = 1, detail = 0 ) {
|
|
@@ -40207,8 +40213,8 @@ class TetrahedronGeometry extends PolyhedronGeometry {
|
|
|
40207
40213
|
|
|
40208
40214
|
}
|
|
40209
40215
|
|
|
40210
|
-
}
|
|
40211
|
-
|
|
40216
|
+
}
|
|
40217
|
+
|
|
40212
40218
|
class TorusGeometry extends BufferGeometry {
|
|
40213
40219
|
|
|
40214
40220
|
constructor( radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2 ) {
|
|
@@ -40322,8 +40328,8 @@ class TorusGeometry extends BufferGeometry {
|
|
|
40322
40328
|
|
|
40323
40329
|
}
|
|
40324
40330
|
|
|
40325
|
-
}
|
|
40326
|
-
|
|
40331
|
+
}
|
|
40332
|
+
|
|
40327
40333
|
class TorusKnotGeometry extends BufferGeometry {
|
|
40328
40334
|
|
|
40329
40335
|
constructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) {
|
|
@@ -40484,8 +40490,8 @@ class TorusKnotGeometry extends BufferGeometry {
|
|
|
40484
40490
|
|
|
40485
40491
|
}
|
|
40486
40492
|
|
|
40487
|
-
}
|
|
40488
|
-
|
|
40493
|
+
}
|
|
40494
|
+
|
|
40489
40495
|
class TubeGeometry extends BufferGeometry {
|
|
40490
40496
|
|
|
40491
40497
|
constructor( path = new QuadraticBezierCurve3( new Vector3( - 1, - 1, 0 ), new Vector3( - 1, 1, 0 ), new Vector3( 1, 1, 0 ) ), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) {
|
|
@@ -40679,8 +40685,8 @@ class TubeGeometry extends BufferGeometry {
|
|
|
40679
40685
|
|
|
40680
40686
|
}
|
|
40681
40687
|
|
|
40682
|
-
}
|
|
40683
|
-
|
|
40688
|
+
}
|
|
40689
|
+
|
|
40684
40690
|
class WireframeGeometry extends BufferGeometry {
|
|
40685
40691
|
|
|
40686
40692
|
constructor( geometry = null ) {
|
|
@@ -40820,33 +40826,33 @@ function isUniqueEdge( start, end, edges ) {
|
|
|
40820
40826
|
|
|
40821
40827
|
}
|
|
40822
40828
|
|
|
40823
|
-
}
|
|
40824
|
-
|
|
40825
|
-
var Geometries = /*#__PURE__*/Object.freeze({
|
|
40826
|
-
__proto__: null,
|
|
40827
|
-
BoxGeometry: BoxGeometry,
|
|
40828
|
-
CapsuleGeometry: CapsuleGeometry,
|
|
40829
|
-
CircleGeometry: CircleGeometry,
|
|
40830
|
-
ConeGeometry: ConeGeometry,
|
|
40831
|
-
CylinderGeometry: CylinderGeometry,
|
|
40832
|
-
DodecahedronGeometry: DodecahedronGeometry,
|
|
40833
|
-
EdgesGeometry: EdgesGeometry,
|
|
40834
|
-
ExtrudeGeometry: ExtrudeGeometry,
|
|
40835
|
-
IcosahedronGeometry: IcosahedronGeometry,
|
|
40836
|
-
LatheGeometry: LatheGeometry,
|
|
40837
|
-
OctahedronGeometry: OctahedronGeometry,
|
|
40838
|
-
PlaneGeometry: PlaneGeometry,
|
|
40839
|
-
PolyhedronGeometry: PolyhedronGeometry,
|
|
40840
|
-
RingGeometry: RingGeometry,
|
|
40841
|
-
ShapeGeometry: ShapeGeometry,
|
|
40842
|
-
SphereGeometry: SphereGeometry,
|
|
40843
|
-
TetrahedronGeometry: TetrahedronGeometry,
|
|
40844
|
-
TorusGeometry: TorusGeometry,
|
|
40845
|
-
TorusKnotGeometry: TorusKnotGeometry,
|
|
40846
|
-
TubeGeometry: TubeGeometry,
|
|
40847
|
-
WireframeGeometry: WireframeGeometry
|
|
40848
|
-
});
|
|
40849
|
-
|
|
40829
|
+
}
|
|
40830
|
+
|
|
40831
|
+
var Geometries = /*#__PURE__*/Object.freeze({
|
|
40832
|
+
__proto__: null,
|
|
40833
|
+
BoxGeometry: BoxGeometry,
|
|
40834
|
+
CapsuleGeometry: CapsuleGeometry,
|
|
40835
|
+
CircleGeometry: CircleGeometry,
|
|
40836
|
+
ConeGeometry: ConeGeometry,
|
|
40837
|
+
CylinderGeometry: CylinderGeometry,
|
|
40838
|
+
DodecahedronGeometry: DodecahedronGeometry,
|
|
40839
|
+
EdgesGeometry: EdgesGeometry,
|
|
40840
|
+
ExtrudeGeometry: ExtrudeGeometry,
|
|
40841
|
+
IcosahedronGeometry: IcosahedronGeometry,
|
|
40842
|
+
LatheGeometry: LatheGeometry,
|
|
40843
|
+
OctahedronGeometry: OctahedronGeometry,
|
|
40844
|
+
PlaneGeometry: PlaneGeometry,
|
|
40845
|
+
PolyhedronGeometry: PolyhedronGeometry,
|
|
40846
|
+
RingGeometry: RingGeometry,
|
|
40847
|
+
ShapeGeometry: ShapeGeometry,
|
|
40848
|
+
SphereGeometry: SphereGeometry,
|
|
40849
|
+
TetrahedronGeometry: TetrahedronGeometry,
|
|
40850
|
+
TorusGeometry: TorusGeometry,
|
|
40851
|
+
TorusKnotGeometry: TorusKnotGeometry,
|
|
40852
|
+
TubeGeometry: TubeGeometry,
|
|
40853
|
+
WireframeGeometry: WireframeGeometry
|
|
40854
|
+
});
|
|
40855
|
+
|
|
40850
40856
|
class ShadowMaterial extends Material {
|
|
40851
40857
|
|
|
40852
40858
|
constructor( parameters ) {
|
|
@@ -40878,8 +40884,8 @@ class ShadowMaterial extends Material {
|
|
|
40878
40884
|
|
|
40879
40885
|
}
|
|
40880
40886
|
|
|
40881
|
-
}
|
|
40882
|
-
|
|
40887
|
+
}
|
|
40888
|
+
|
|
40883
40889
|
class RawShaderMaterial extends ShaderMaterial {
|
|
40884
40890
|
|
|
40885
40891
|
constructor( parameters ) {
|
|
@@ -40892,8 +40898,8 @@ class RawShaderMaterial extends ShaderMaterial {
|
|
|
40892
40898
|
|
|
40893
40899
|
}
|
|
40894
40900
|
|
|
40895
|
-
}
|
|
40896
|
-
|
|
40901
|
+
}
|
|
40902
|
+
|
|
40897
40903
|
class MeshStandardMaterial extends Material {
|
|
40898
40904
|
|
|
40899
40905
|
constructor( parameters ) {
|
|
@@ -41012,8 +41018,8 @@ class MeshStandardMaterial extends Material {
|
|
|
41012
41018
|
|
|
41013
41019
|
}
|
|
41014
41020
|
|
|
41015
|
-
}
|
|
41016
|
-
|
|
41021
|
+
}
|
|
41022
|
+
|
|
41017
41023
|
class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
41018
41024
|
|
|
41019
41025
|
constructor( parameters ) {
|
|
@@ -41230,8 +41236,8 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
|
|
|
41230
41236
|
|
|
41231
41237
|
}
|
|
41232
41238
|
|
|
41233
|
-
}
|
|
41234
|
-
|
|
41239
|
+
}
|
|
41240
|
+
|
|
41235
41241
|
class MeshPhongMaterial extends Material {
|
|
41236
41242
|
|
|
41237
41243
|
constructor( parameters ) {
|
|
@@ -41346,8 +41352,8 @@ class MeshPhongMaterial extends Material {
|
|
|
41346
41352
|
|
|
41347
41353
|
}
|
|
41348
41354
|
|
|
41349
|
-
}
|
|
41350
|
-
|
|
41355
|
+
}
|
|
41356
|
+
|
|
41351
41357
|
class MeshToonMaterial extends Material {
|
|
41352
41358
|
|
|
41353
41359
|
constructor( parameters ) {
|
|
@@ -41442,8 +41448,8 @@ class MeshToonMaterial extends Material {
|
|
|
41442
41448
|
|
|
41443
41449
|
}
|
|
41444
41450
|
|
|
41445
|
-
}
|
|
41446
|
-
|
|
41451
|
+
}
|
|
41452
|
+
|
|
41447
41453
|
class MeshNormalMaterial extends Material {
|
|
41448
41454
|
|
|
41449
41455
|
constructor( parameters ) {
|
|
@@ -41498,8 +41504,8 @@ class MeshNormalMaterial extends Material {
|
|
|
41498
41504
|
|
|
41499
41505
|
}
|
|
41500
41506
|
|
|
41501
|
-
}
|
|
41502
|
-
|
|
41507
|
+
}
|
|
41508
|
+
|
|
41503
41509
|
class MeshLambertMaterial extends Material {
|
|
41504
41510
|
|
|
41505
41511
|
constructor( parameters ) {
|
|
@@ -41610,8 +41616,8 @@ class MeshLambertMaterial extends Material {
|
|
|
41610
41616
|
|
|
41611
41617
|
}
|
|
41612
41618
|
|
|
41613
|
-
}
|
|
41614
|
-
|
|
41619
|
+
}
|
|
41620
|
+
|
|
41615
41621
|
class MeshMatcapMaterial extends Material {
|
|
41616
41622
|
|
|
41617
41623
|
constructor( parameters ) {
|
|
@@ -41685,8 +41691,8 @@ class MeshMatcapMaterial extends Material {
|
|
|
41685
41691
|
|
|
41686
41692
|
}
|
|
41687
41693
|
|
|
41688
|
-
}
|
|
41689
|
-
|
|
41694
|
+
}
|
|
41695
|
+
|
|
41690
41696
|
class LineDashedMaterial extends LineBasicMaterial {
|
|
41691
41697
|
|
|
41692
41698
|
constructor( parameters ) {
|
|
@@ -41717,8 +41723,8 @@ class LineDashedMaterial extends LineBasicMaterial {
|
|
|
41717
41723
|
|
|
41718
41724
|
}
|
|
41719
41725
|
|
|
41720
|
-
}
|
|
41721
|
-
|
|
41726
|
+
}
|
|
41727
|
+
|
|
41722
41728
|
// converts an array to a specific type
|
|
41723
41729
|
function convertArray( array, type, forceClone ) {
|
|
41724
41730
|
|
|
@@ -42060,8 +42066,8 @@ const AnimationUtils = {
|
|
|
42060
42066
|
flattenJSON: flattenJSON,
|
|
42061
42067
|
subclip: subclip,
|
|
42062
42068
|
makeClipAdditive: makeClipAdditive
|
|
42063
|
-
};
|
|
42064
|
-
|
|
42069
|
+
};
|
|
42070
|
+
|
|
42065
42071
|
/**
|
|
42066
42072
|
* Abstract base class of interpolants over parametric samples.
|
|
42067
42073
|
*
|
|
@@ -42300,8 +42306,8 @@ class Interpolant {
|
|
|
42300
42306
|
|
|
42301
42307
|
}
|
|
42302
42308
|
|
|
42303
|
-
}
|
|
42304
|
-
|
|
42309
|
+
}
|
|
42310
|
+
|
|
42305
42311
|
/**
|
|
42306
42312
|
* Fast and simple cubic spline interpolant.
|
|
42307
42313
|
*
|
|
@@ -42446,8 +42452,8 @@ class CubicInterpolant extends Interpolant {
|
|
|
42446
42452
|
|
|
42447
42453
|
}
|
|
42448
42454
|
|
|
42449
|
-
}
|
|
42450
|
-
|
|
42455
|
+
}
|
|
42456
|
+
|
|
42451
42457
|
class LinearInterpolant extends Interpolant {
|
|
42452
42458
|
|
|
42453
42459
|
constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
|
|
@@ -42480,8 +42486,8 @@ class LinearInterpolant extends Interpolant {
|
|
|
42480
42486
|
|
|
42481
42487
|
}
|
|
42482
42488
|
|
|
42483
|
-
}
|
|
42484
|
-
|
|
42489
|
+
}
|
|
42490
|
+
|
|
42485
42491
|
/**
|
|
42486
42492
|
*
|
|
42487
42493
|
* Interpolant that evaluates to the sample value at the position preceding
|
|
@@ -42502,8 +42508,8 @@ class DiscreteInterpolant extends Interpolant {
|
|
|
42502
42508
|
|
|
42503
42509
|
}
|
|
42504
42510
|
|
|
42505
|
-
}
|
|
42506
|
-
|
|
42511
|
+
}
|
|
42512
|
+
|
|
42507
42513
|
class KeyframeTrack {
|
|
42508
42514
|
|
|
42509
42515
|
constructor( name, times, values, interpolation ) {
|
|
@@ -42953,8 +42959,8 @@ class KeyframeTrack {
|
|
|
42953
42959
|
|
|
42954
42960
|
KeyframeTrack.prototype.TimeBufferType = Float32Array;
|
|
42955
42961
|
KeyframeTrack.prototype.ValueBufferType = Float32Array;
|
|
42956
|
-
KeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;
|
|
42957
|
-
|
|
42962
|
+
KeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;
|
|
42963
|
+
|
|
42958
42964
|
/**
|
|
42959
42965
|
* A Track of Boolean keyframe values.
|
|
42960
42966
|
*/
|
|
@@ -42964,22 +42970,22 @@ BooleanKeyframeTrack.prototype.ValueTypeName = 'bool';
|
|
|
42964
42970
|
BooleanKeyframeTrack.prototype.ValueBufferType = Array;
|
|
42965
42971
|
BooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;
|
|
42966
42972
|
BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;
|
|
42967
|
-
BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
|
|
42968
|
-
|
|
42973
|
+
BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
|
|
42974
|
+
|
|
42969
42975
|
/**
|
|
42970
42976
|
* A Track of keyframe values that represent color.
|
|
42971
42977
|
*/
|
|
42972
42978
|
class ColorKeyframeTrack extends KeyframeTrack {}
|
|
42973
42979
|
|
|
42974
|
-
ColorKeyframeTrack.prototype.ValueTypeName = 'color';
|
|
42975
|
-
|
|
42980
|
+
ColorKeyframeTrack.prototype.ValueTypeName = 'color';
|
|
42981
|
+
|
|
42976
42982
|
/**
|
|
42977
42983
|
* A Track of numeric keyframe values.
|
|
42978
42984
|
*/
|
|
42979
42985
|
class NumberKeyframeTrack extends KeyframeTrack {}
|
|
42980
42986
|
|
|
42981
|
-
NumberKeyframeTrack.prototype.ValueTypeName = 'number';
|
|
42982
|
-
|
|
42987
|
+
NumberKeyframeTrack.prototype.ValueTypeName = 'number';
|
|
42988
|
+
|
|
42983
42989
|
/**
|
|
42984
42990
|
* Spherical linear unit quaternion interpolant.
|
|
42985
42991
|
*/
|
|
@@ -43012,8 +43018,8 @@ class QuaternionLinearInterpolant extends Interpolant {
|
|
|
43012
43018
|
|
|
43013
43019
|
}
|
|
43014
43020
|
|
|
43015
|
-
}
|
|
43016
|
-
|
|
43021
|
+
}
|
|
43022
|
+
|
|
43017
43023
|
/**
|
|
43018
43024
|
* A Track of quaternion keyframe values.
|
|
43019
43025
|
*/
|
|
@@ -43030,8 +43036,8 @@ class QuaternionKeyframeTrack extends KeyframeTrack {
|
|
|
43030
43036
|
QuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion';
|
|
43031
43037
|
// ValueBufferType is inherited
|
|
43032
43038
|
QuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;
|
|
43033
|
-
QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
|
|
43034
|
-
|
|
43039
|
+
QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
|
|
43040
|
+
|
|
43035
43041
|
/**
|
|
43036
43042
|
* A Track that interpolates Strings
|
|
43037
43043
|
*/
|
|
@@ -43041,15 +43047,15 @@ StringKeyframeTrack.prototype.ValueTypeName = 'string';
|
|
|
43041
43047
|
StringKeyframeTrack.prototype.ValueBufferType = Array;
|
|
43042
43048
|
StringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;
|
|
43043
43049
|
StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;
|
|
43044
|
-
StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
|
|
43045
|
-
|
|
43050
|
+
StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
|
|
43051
|
+
|
|
43046
43052
|
/**
|
|
43047
43053
|
* A Track of vectored keyframe values.
|
|
43048
43054
|
*/
|
|
43049
43055
|
class VectorKeyframeTrack extends KeyframeTrack {}
|
|
43050
43056
|
|
|
43051
|
-
VectorKeyframeTrack.prototype.ValueTypeName = 'vector';
|
|
43052
|
-
|
|
43057
|
+
VectorKeyframeTrack.prototype.ValueTypeName = 'vector';
|
|
43058
|
+
|
|
43053
43059
|
class AnimationClip {
|
|
43054
43060
|
|
|
43055
43061
|
constructor( name, duration = - 1, tracks, blendMode = NormalAnimationBlendMode ) {
|
|
@@ -43509,8 +43515,8 @@ function parseKeyframeTrack( json ) {
|
|
|
43509
43515
|
|
|
43510
43516
|
}
|
|
43511
43517
|
|
|
43512
|
-
}
|
|
43513
|
-
|
|
43518
|
+
}
|
|
43519
|
+
|
|
43514
43520
|
const Cache = {
|
|
43515
43521
|
|
|
43516
43522
|
enabled: false,
|
|
@@ -43549,8 +43555,8 @@ const Cache = {
|
|
|
43549
43555
|
|
|
43550
43556
|
}
|
|
43551
43557
|
|
|
43552
|
-
};
|
|
43553
|
-
|
|
43558
|
+
};
|
|
43559
|
+
|
|
43554
43560
|
class LoadingManager {
|
|
43555
43561
|
|
|
43556
43562
|
constructor( onLoad, onProgress, onError ) {
|
|
@@ -43690,8 +43696,8 @@ class LoadingManager {
|
|
|
43690
43696
|
|
|
43691
43697
|
}
|
|
43692
43698
|
|
|
43693
|
-
const DefaultLoadingManager = /*@__PURE__*/ new LoadingManager();
|
|
43694
|
-
|
|
43699
|
+
const DefaultLoadingManager = /*@__PURE__*/ new LoadingManager();
|
|
43700
|
+
|
|
43695
43701
|
class Loader {
|
|
43696
43702
|
|
|
43697
43703
|
constructor( manager ) {
|
|
@@ -43759,8 +43765,8 @@ class Loader {
|
|
|
43759
43765
|
|
|
43760
43766
|
}
|
|
43761
43767
|
|
|
43762
|
-
Loader.DEFAULT_MATERIAL_NAME = '__DEFAULT';
|
|
43763
|
-
|
|
43768
|
+
Loader.DEFAULT_MATERIAL_NAME = '__DEFAULT';
|
|
43769
|
+
|
|
43764
43770
|
const loading = {};
|
|
43765
43771
|
|
|
43766
43772
|
class HttpError extends Error {
|
|
@@ -44038,8 +44044,8 @@ class FileLoader extends Loader {
|
|
|
44038
44044
|
|
|
44039
44045
|
}
|
|
44040
44046
|
|
|
44041
|
-
}
|
|
44042
|
-
|
|
44047
|
+
}
|
|
44048
|
+
|
|
44043
44049
|
class AnimationLoader extends Loader {
|
|
44044
44050
|
|
|
44045
44051
|
constructor( manager ) {
|
|
@@ -44098,8 +44104,8 @@ class AnimationLoader extends Loader {
|
|
|
44098
44104
|
|
|
44099
44105
|
}
|
|
44100
44106
|
|
|
44101
|
-
}
|
|
44102
|
-
|
|
44107
|
+
}
|
|
44108
|
+
|
|
44103
44109
|
/**
|
|
44104
44110
|
* Abstract Base class to block based textures loader (dds, pvr, ...)
|
|
44105
44111
|
*
|
|
@@ -44225,8 +44231,8 @@ class CompressedTextureLoader extends Loader {
|
|
|
44225
44231
|
|
|
44226
44232
|
}
|
|
44227
44233
|
|
|
44228
|
-
}
|
|
44229
|
-
|
|
44234
|
+
}
|
|
44235
|
+
|
|
44230
44236
|
class ImageLoader extends Loader {
|
|
44231
44237
|
|
|
44232
44238
|
constructor( manager ) {
|
|
@@ -44310,8 +44316,8 @@ class ImageLoader extends Loader {
|
|
|
44310
44316
|
|
|
44311
44317
|
}
|
|
44312
44318
|
|
|
44313
|
-
}
|
|
44314
|
-
|
|
44319
|
+
}
|
|
44320
|
+
|
|
44315
44321
|
class CubeTextureLoader extends Loader {
|
|
44316
44322
|
|
|
44317
44323
|
constructor( manager ) {
|
|
@@ -44361,8 +44367,8 @@ class CubeTextureLoader extends Loader {
|
|
|
44361
44367
|
|
|
44362
44368
|
}
|
|
44363
44369
|
|
|
44364
|
-
}
|
|
44365
|
-
|
|
44370
|
+
}
|
|
44371
|
+
|
|
44366
44372
|
/**
|
|
44367
44373
|
* Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)
|
|
44368
44374
|
*
|
|
@@ -44485,8 +44491,8 @@ class DataTextureLoader extends Loader {
|
|
|
44485
44491
|
|
|
44486
44492
|
}
|
|
44487
44493
|
|
|
44488
|
-
}
|
|
44489
|
-
|
|
44494
|
+
}
|
|
44495
|
+
|
|
44490
44496
|
class TextureLoader extends Loader {
|
|
44491
44497
|
|
|
44492
44498
|
constructor( manager ) {
|
|
@@ -44520,8 +44526,8 @@ class TextureLoader extends Loader {
|
|
|
44520
44526
|
|
|
44521
44527
|
}
|
|
44522
44528
|
|
|
44523
|
-
}
|
|
44524
|
-
|
|
44529
|
+
}
|
|
44530
|
+
|
|
44525
44531
|
class Light extends Object3D {
|
|
44526
44532
|
|
|
44527
44533
|
constructor( color, intensity = 1 ) {
|
|
@@ -44574,8 +44580,8 @@ class Light extends Object3D {
|
|
|
44574
44580
|
|
|
44575
44581
|
}
|
|
44576
44582
|
|
|
44577
|
-
}
|
|
44578
|
-
|
|
44583
|
+
}
|
|
44584
|
+
|
|
44579
44585
|
class HemisphereLight extends Light {
|
|
44580
44586
|
|
|
44581
44587
|
constructor( skyColor, groundColor, intensity ) {
|
|
@@ -44603,8 +44609,8 @@ class HemisphereLight extends Light {
|
|
|
44603
44609
|
|
|
44604
44610
|
}
|
|
44605
44611
|
|
|
44606
|
-
}
|
|
44607
|
-
|
|
44612
|
+
}
|
|
44613
|
+
|
|
44608
44614
|
const _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();
|
|
44609
44615
|
const _lightPositionWorld$1 = /*@__PURE__*/ new Vector3();
|
|
44610
44616
|
const _lookTarget$1 = /*@__PURE__*/ new Vector3();
|
|
@@ -44743,8 +44749,8 @@ class LightShadow {
|
|
|
44743
44749
|
|
|
44744
44750
|
}
|
|
44745
44751
|
|
|
44746
|
-
}
|
|
44747
|
-
|
|
44752
|
+
}
|
|
44753
|
+
|
|
44748
44754
|
class SpotLightShadow extends LightShadow {
|
|
44749
44755
|
|
|
44750
44756
|
constructor() {
|
|
@@ -44788,8 +44794,8 @@ class SpotLightShadow extends LightShadow {
|
|
|
44788
44794
|
|
|
44789
44795
|
}
|
|
44790
44796
|
|
|
44791
|
-
}
|
|
44792
|
-
|
|
44797
|
+
}
|
|
44798
|
+
|
|
44793
44799
|
class SpotLight extends Light {
|
|
44794
44800
|
|
|
44795
44801
|
constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2 ) {
|
|
@@ -44854,8 +44860,8 @@ class SpotLight extends Light {
|
|
|
44854
44860
|
|
|
44855
44861
|
}
|
|
44856
44862
|
|
|
44857
|
-
}
|
|
44858
|
-
|
|
44863
|
+
}
|
|
44864
|
+
|
|
44859
44865
|
const _projScreenMatrix = /*@__PURE__*/ new Matrix4();
|
|
44860
44866
|
const _lightPositionWorld = /*@__PURE__*/ new Vector3();
|
|
44861
44867
|
const _lookTarget = /*@__PURE__*/ new Vector3();
|
|
@@ -44942,8 +44948,8 @@ class PointLightShadow extends LightShadow {
|
|
|
44942
44948
|
|
|
44943
44949
|
}
|
|
44944
44950
|
|
|
44945
|
-
}
|
|
44946
|
-
|
|
44951
|
+
}
|
|
44952
|
+
|
|
44947
44953
|
class PointLight extends Light {
|
|
44948
44954
|
|
|
44949
44955
|
constructor( color, intensity, distance = 0, decay = 2 ) {
|
|
@@ -44995,8 +45001,8 @@ class PointLight extends Light {
|
|
|
44995
45001
|
|
|
44996
45002
|
}
|
|
44997
45003
|
|
|
44998
|
-
}
|
|
44999
|
-
|
|
45004
|
+
}
|
|
45005
|
+
|
|
45000
45006
|
class DirectionalLightShadow extends LightShadow {
|
|
45001
45007
|
|
|
45002
45008
|
constructor() {
|
|
@@ -45007,8 +45013,8 @@ class DirectionalLightShadow extends LightShadow {
|
|
|
45007
45013
|
|
|
45008
45014
|
}
|
|
45009
45015
|
|
|
45010
|
-
}
|
|
45011
|
-
|
|
45016
|
+
}
|
|
45017
|
+
|
|
45012
45018
|
class DirectionalLight extends Light {
|
|
45013
45019
|
|
|
45014
45020
|
constructor( color, intensity ) {
|
|
@@ -45045,8 +45051,8 @@ class DirectionalLight extends Light {
|
|
|
45045
45051
|
|
|
45046
45052
|
}
|
|
45047
45053
|
|
|
45048
|
-
}
|
|
45049
|
-
|
|
45054
|
+
}
|
|
45055
|
+
|
|
45050
45056
|
class AmbientLight extends Light {
|
|
45051
45057
|
|
|
45052
45058
|
constructor( color, intensity ) {
|
|
@@ -45059,8 +45065,8 @@ class AmbientLight extends Light {
|
|
|
45059
45065
|
|
|
45060
45066
|
}
|
|
45061
45067
|
|
|
45062
|
-
}
|
|
45063
|
-
|
|
45068
|
+
}
|
|
45069
|
+
|
|
45064
45070
|
class RectAreaLight extends Light {
|
|
45065
45071
|
|
|
45066
45072
|
constructor( color, intensity, width = 10, height = 10 ) {
|
|
@@ -45112,8 +45118,8 @@ class RectAreaLight extends Light {
|
|
|
45112
45118
|
|
|
45113
45119
|
}
|
|
45114
45120
|
|
|
45115
|
-
}
|
|
45116
|
-
|
|
45121
|
+
}
|
|
45122
|
+
|
|
45117
45123
|
/**
|
|
45118
45124
|
* Primary reference:
|
|
45119
45125
|
* https://graphics.stanford.edu/papers/envmap/envmap.pdf
|
|
@@ -45352,8 +45358,8 @@ class SphericalHarmonics3 {
|
|
|
45352
45358
|
|
|
45353
45359
|
}
|
|
45354
45360
|
|
|
45355
|
-
}
|
|
45356
|
-
|
|
45361
|
+
}
|
|
45362
|
+
|
|
45357
45363
|
class LightProbe extends Light {
|
|
45358
45364
|
|
|
45359
45365
|
constructor( sh = new SphericalHarmonics3(), intensity = 1 ) {
|
|
@@ -45395,8 +45401,8 @@ class LightProbe extends Light {
|
|
|
45395
45401
|
|
|
45396
45402
|
}
|
|
45397
45403
|
|
|
45398
|
-
}
|
|
45399
|
-
|
|
45404
|
+
}
|
|
45405
|
+
|
|
45400
45406
|
class MaterialLoader extends Loader {
|
|
45401
45407
|
|
|
45402
45408
|
constructor( manager ) {
|
|
@@ -45738,8 +45744,8 @@ class MaterialLoader extends Loader {
|
|
|
45738
45744
|
|
|
45739
45745
|
}
|
|
45740
45746
|
|
|
45741
|
-
}
|
|
45742
|
-
|
|
45747
|
+
}
|
|
45748
|
+
|
|
45743
45749
|
class LoaderUtils {
|
|
45744
45750
|
|
|
45745
45751
|
static decodeText( array ) {
|
|
@@ -45812,8 +45818,8 @@ class LoaderUtils {
|
|
|
45812
45818
|
|
|
45813
45819
|
}
|
|
45814
45820
|
|
|
45815
|
-
}
|
|
45816
|
-
|
|
45821
|
+
}
|
|
45822
|
+
|
|
45817
45823
|
class InstancedBufferGeometry extends BufferGeometry {
|
|
45818
45824
|
|
|
45819
45825
|
constructor() {
|
|
@@ -45849,8 +45855,8 @@ class InstancedBufferGeometry extends BufferGeometry {
|
|
|
45849
45855
|
|
|
45850
45856
|
}
|
|
45851
45857
|
|
|
45852
|
-
}
|
|
45853
|
-
|
|
45858
|
+
}
|
|
45859
|
+
|
|
45854
45860
|
class BufferGeometryLoader extends Loader {
|
|
45855
45861
|
|
|
45856
45862
|
constructor( manager ) {
|
|
@@ -46053,8 +46059,8 @@ class BufferGeometryLoader extends Loader {
|
|
|
46053
46059
|
|
|
46054
46060
|
}
|
|
46055
46061
|
|
|
46056
|
-
}
|
|
46057
|
-
|
|
46062
|
+
}
|
|
46063
|
+
|
|
46058
46064
|
class ObjectLoader extends Loader {
|
|
46059
46065
|
|
|
46060
46066
|
constructor( manager ) {
|
|
@@ -47136,8 +47142,8 @@ const TEXTURE_FILTER = {
|
|
|
47136
47142
|
LinearFilter: LinearFilter,
|
|
47137
47143
|
LinearMipmapNearestFilter: LinearMipmapNearestFilter,
|
|
47138
47144
|
LinearMipmapLinearFilter: LinearMipmapLinearFilter
|
|
47139
|
-
};
|
|
47140
|
-
|
|
47145
|
+
};
|
|
47146
|
+
|
|
47141
47147
|
class ImageBitmapLoader extends Loader {
|
|
47142
47148
|
|
|
47143
47149
|
constructor( manager ) {
|
|
@@ -47255,8 +47261,8 @@ class ImageBitmapLoader extends Loader {
|
|
|
47255
47261
|
|
|
47256
47262
|
}
|
|
47257
47263
|
|
|
47258
|
-
}
|
|
47259
|
-
|
|
47264
|
+
}
|
|
47265
|
+
|
|
47260
47266
|
let _context;
|
|
47261
47267
|
|
|
47262
47268
|
class AudioContext {
|
|
@@ -47279,8 +47285,8 @@ class AudioContext {
|
|
|
47279
47285
|
|
|
47280
47286
|
}
|
|
47281
47287
|
|
|
47282
|
-
}
|
|
47283
|
-
|
|
47288
|
+
}
|
|
47289
|
+
|
|
47284
47290
|
class AudioLoader extends Loader {
|
|
47285
47291
|
|
|
47286
47292
|
constructor( manager ) {
|
|
@@ -47339,8 +47345,8 @@ class AudioLoader extends Loader {
|
|
|
47339
47345
|
|
|
47340
47346
|
}
|
|
47341
47347
|
|
|
47342
|
-
}
|
|
47343
|
-
|
|
47348
|
+
}
|
|
47349
|
+
|
|
47344
47350
|
const _eyeRight = /*@__PURE__*/ new Matrix4();
|
|
47345
47351
|
const _eyeLeft = /*@__PURE__*/ new Matrix4();
|
|
47346
47352
|
const _projectionMatrix = /*@__PURE__*/ new Matrix4();
|
|
@@ -47434,8 +47440,8 @@ class StereoCamera {
|
|
|
47434
47440
|
|
|
47435
47441
|
}
|
|
47436
47442
|
|
|
47437
|
-
}
|
|
47438
|
-
|
|
47443
|
+
}
|
|
47444
|
+
|
|
47439
47445
|
class Clock {
|
|
47440
47446
|
|
|
47441
47447
|
constructor( autoStart = true ) {
|
|
@@ -47507,8 +47513,8 @@ function now() {
|
|
|
47507
47513
|
|
|
47508
47514
|
return ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732
|
|
47509
47515
|
|
|
47510
|
-
}
|
|
47511
|
-
|
|
47516
|
+
}
|
|
47517
|
+
|
|
47512
47518
|
const _position$1 = /*@__PURE__*/ new Vector3();
|
|
47513
47519
|
const _quaternion$1 = /*@__PURE__*/ new Quaternion();
|
|
47514
47520
|
const _scale$1 = /*@__PURE__*/ new Vector3();
|
|
@@ -47640,8 +47646,8 @@ class AudioListener extends Object3D {
|
|
|
47640
47646
|
|
|
47641
47647
|
}
|
|
47642
47648
|
|
|
47643
|
-
}
|
|
47644
|
-
|
|
47649
|
+
}
|
|
47650
|
+
|
|
47645
47651
|
class Audio extends Object3D {
|
|
47646
47652
|
|
|
47647
47653
|
constructor( listener ) {
|
|
@@ -48037,8 +48043,8 @@ class Audio extends Object3D {
|
|
|
48037
48043
|
|
|
48038
48044
|
}
|
|
48039
48045
|
|
|
48040
|
-
}
|
|
48041
|
-
|
|
48046
|
+
}
|
|
48047
|
+
|
|
48042
48048
|
const _position = /*@__PURE__*/ new Vector3();
|
|
48043
48049
|
const _quaternion = /*@__PURE__*/ new Quaternion();
|
|
48044
48050
|
const _scale = /*@__PURE__*/ new Vector3();
|
|
@@ -48178,8 +48184,8 @@ class PositionalAudio extends Audio {
|
|
|
48178
48184
|
|
|
48179
48185
|
}
|
|
48180
48186
|
|
|
48181
|
-
}
|
|
48182
|
-
|
|
48187
|
+
}
|
|
48188
|
+
|
|
48183
48189
|
class AudioAnalyser {
|
|
48184
48190
|
|
|
48185
48191
|
constructor( audio, fftSize = 2048 ) {
|
|
@@ -48217,8 +48223,8 @@ class AudioAnalyser {
|
|
|
48217
48223
|
|
|
48218
48224
|
}
|
|
48219
48225
|
|
|
48220
|
-
}
|
|
48221
|
-
|
|
48226
|
+
}
|
|
48227
|
+
|
|
48222
48228
|
class PropertyMixer {
|
|
48223
48229
|
|
|
48224
48230
|
constructor( binding, typeName, valueSize ) {
|
|
@@ -48531,8 +48537,8 @@ class PropertyMixer {
|
|
|
48531
48537
|
|
|
48532
48538
|
}
|
|
48533
48539
|
|
|
48534
|
-
}
|
|
48535
|
-
|
|
48540
|
+
}
|
|
48541
|
+
|
|
48536
48542
|
// Characters [].:/ are reserved for track binding syntax.
|
|
48537
48543
|
const _RESERVED_CHARS_RE = '\\[\\]\\.:\\/';
|
|
48538
48544
|
const _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' );
|
|
@@ -49264,8 +49270,8 @@ PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [
|
|
|
49264
49270
|
|
|
49265
49271
|
]
|
|
49266
49272
|
|
|
49267
|
-
];
|
|
49268
|
-
|
|
49273
|
+
];
|
|
49274
|
+
|
|
49269
49275
|
/**
|
|
49270
49276
|
*
|
|
49271
49277
|
* A group of objects that receives a shared animation state.
|
|
@@ -49647,8 +49653,8 @@ class AnimationObjectGroup {
|
|
|
49647
49653
|
|
|
49648
49654
|
}
|
|
49649
49655
|
|
|
49650
|
-
}
|
|
49651
|
-
|
|
49656
|
+
}
|
|
49657
|
+
|
|
49652
49658
|
class AnimationAction {
|
|
49653
49659
|
|
|
49654
49660
|
constructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) {
|
|
@@ -50342,8 +50348,8 @@ class AnimationAction {
|
|
|
50342
50348
|
|
|
50343
50349
|
}
|
|
50344
50350
|
|
|
50345
|
-
}
|
|
50346
|
-
|
|
50351
|
+
}
|
|
50352
|
+
|
|
50347
50353
|
const _controlInterpolantsResultBuffer = new Float32Array( 1 );
|
|
50348
50354
|
|
|
50349
50355
|
|
|
@@ -51102,8 +51108,8 @@ class AnimationMixer extends EventDispatcher {
|
|
|
51102
51108
|
|
|
51103
51109
|
}
|
|
51104
51110
|
|
|
51105
|
-
}
|
|
51106
|
-
|
|
51111
|
+
}
|
|
51112
|
+
|
|
51107
51113
|
class Uniform {
|
|
51108
51114
|
|
|
51109
51115
|
constructor( value ) {
|
|
@@ -51118,8 +51124,8 @@ class Uniform {
|
|
|
51118
51124
|
|
|
51119
51125
|
}
|
|
51120
51126
|
|
|
51121
|
-
}
|
|
51122
|
-
|
|
51127
|
+
}
|
|
51128
|
+
|
|
51123
51129
|
let _id = 0;
|
|
51124
51130
|
|
|
51125
51131
|
class UniformsGroup extends EventDispatcher {
|
|
@@ -51212,8 +51218,8 @@ class UniformsGroup extends EventDispatcher {
|
|
|
51212
51218
|
|
|
51213
51219
|
}
|
|
51214
51220
|
|
|
51215
|
-
}
|
|
51216
|
-
|
|
51221
|
+
}
|
|
51222
|
+
|
|
51217
51223
|
class InstancedInterleavedBuffer extends InterleavedBuffer {
|
|
51218
51224
|
|
|
51219
51225
|
constructor( array, stride, meshPerAttribute = 1 ) {
|
|
@@ -51257,8 +51263,8 @@ class InstancedInterleavedBuffer extends InterleavedBuffer {
|
|
|
51257
51263
|
|
|
51258
51264
|
}
|
|
51259
51265
|
|
|
51260
|
-
}
|
|
51261
|
-
|
|
51266
|
+
}
|
|
51267
|
+
|
|
51262
51268
|
class GLBufferAttribute {
|
|
51263
51269
|
|
|
51264
51270
|
constructor( buffer, type, itemSize, elementSize, count ) {
|
|
@@ -51316,8 +51322,8 @@ class GLBufferAttribute {
|
|
|
51316
51322
|
|
|
51317
51323
|
}
|
|
51318
51324
|
|
|
51319
|
-
}
|
|
51320
|
-
|
|
51325
|
+
}
|
|
51326
|
+
|
|
51321
51327
|
const _matrix = /*@__PURE__*/ new Matrix4();
|
|
51322
51328
|
|
|
51323
51329
|
class Raycaster {
|
|
@@ -51435,8 +51441,8 @@ function intersect( object, raycaster, intersects, recursive ) {
|
|
|
51435
51441
|
|
|
51436
51442
|
}
|
|
51437
51443
|
|
|
51438
|
-
}
|
|
51439
|
-
|
|
51444
|
+
}
|
|
51445
|
+
|
|
51440
51446
|
/**
|
|
51441
51447
|
* Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system
|
|
51442
51448
|
*
|
|
@@ -51519,8 +51525,8 @@ class Spherical {
|
|
|
51519
51525
|
|
|
51520
51526
|
}
|
|
51521
51527
|
|
|
51522
|
-
}
|
|
51523
|
-
|
|
51528
|
+
}
|
|
51529
|
+
|
|
51524
51530
|
/**
|
|
51525
51531
|
* Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system
|
|
51526
51532
|
*/
|
|
@@ -51579,8 +51585,8 @@ class Cylindrical {
|
|
|
51579
51585
|
|
|
51580
51586
|
}
|
|
51581
51587
|
|
|
51582
|
-
}
|
|
51583
|
-
|
|
51588
|
+
}
|
|
51589
|
+
|
|
51584
51590
|
const _vector$4 = /*@__PURE__*/ new Vector2();
|
|
51585
51591
|
|
|
51586
51592
|
class Box2 {
|
|
@@ -51780,8 +51786,8 @@ class Box2 {
|
|
|
51780
51786
|
|
|
51781
51787
|
}
|
|
51782
51788
|
|
|
51783
|
-
}
|
|
51784
|
-
|
|
51789
|
+
}
|
|
51790
|
+
|
|
51785
51791
|
const _startP = /*@__PURE__*/ new Vector3();
|
|
51786
51792
|
const _startEnd = /*@__PURE__*/ new Vector3();
|
|
51787
51793
|
|
|
@@ -51891,8 +51897,8 @@ class Line3 {
|
|
|
51891
51897
|
|
|
51892
51898
|
}
|
|
51893
51899
|
|
|
51894
|
-
}
|
|
51895
|
-
|
|
51900
|
+
}
|
|
51901
|
+
|
|
51896
51902
|
const _vector$3 = /*@__PURE__*/ new Vector3();
|
|
51897
51903
|
|
|
51898
51904
|
class SpotLightHelper extends Object3D {
|
|
@@ -51993,8 +51999,8 @@ class SpotLightHelper extends Object3D {
|
|
|
51993
51999
|
|
|
51994
52000
|
}
|
|
51995
52001
|
|
|
51996
|
-
}
|
|
51997
|
-
|
|
52002
|
+
}
|
|
52003
|
+
|
|
51998
52004
|
const _vector$2 = /*@__PURE__*/ new Vector3();
|
|
51999
52005
|
const _boneMatrix = /*@__PURE__*/ new Matrix4();
|
|
52000
52006
|
const _matrixWorldInv = /*@__PURE__*/ new Matrix4();
|
|
@@ -52111,8 +52117,8 @@ function getBoneList( object ) {
|
|
|
52111
52117
|
|
|
52112
52118
|
return boneList;
|
|
52113
52119
|
|
|
52114
|
-
}
|
|
52115
|
-
|
|
52120
|
+
}
|
|
52121
|
+
|
|
52116
52122
|
class PointLightHelper extends Mesh {
|
|
52117
52123
|
|
|
52118
52124
|
constructor( light, sphereSize, color ) {
|
|
@@ -52197,8 +52203,8 @@ class PointLightHelper extends Mesh {
|
|
|
52197
52203
|
|
|
52198
52204
|
}
|
|
52199
52205
|
|
|
52200
|
-
}
|
|
52201
|
-
|
|
52206
|
+
}
|
|
52207
|
+
|
|
52202
52208
|
const _vector$1 = /*@__PURE__*/ new Vector3();
|
|
52203
52209
|
const _color1 = /*@__PURE__*/ new Color();
|
|
52204
52210
|
const _color2 = /*@__PURE__*/ new Color();
|
|
@@ -52275,8 +52281,8 @@ class HemisphereLightHelper extends Object3D {
|
|
|
52275
52281
|
|
|
52276
52282
|
}
|
|
52277
52283
|
|
|
52278
|
-
}
|
|
52279
|
-
|
|
52284
|
+
}
|
|
52285
|
+
|
|
52280
52286
|
class GridHelper extends LineSegments {
|
|
52281
52287
|
|
|
52282
52288
|
constructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) {
|
|
@@ -52323,8 +52329,8 @@ class GridHelper extends LineSegments {
|
|
|
52323
52329
|
|
|
52324
52330
|
}
|
|
52325
52331
|
|
|
52326
|
-
}
|
|
52327
|
-
|
|
52332
|
+
}
|
|
52333
|
+
|
|
52328
52334
|
class PolarGridHelper extends LineSegments {
|
|
52329
52335
|
|
|
52330
52336
|
constructor( radius = 10, sectors = 16, rings = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) {
|
|
@@ -52411,8 +52417,8 @@ class PolarGridHelper extends LineSegments {
|
|
|
52411
52417
|
|
|
52412
52418
|
}
|
|
52413
52419
|
|
|
52414
|
-
}
|
|
52415
|
-
|
|
52420
|
+
}
|
|
52421
|
+
|
|
52416
52422
|
const _v1 = /*@__PURE__*/ new Vector3();
|
|
52417
52423
|
const _v2 = /*@__PURE__*/ new Vector3();
|
|
52418
52424
|
const _v3 = /*@__PURE__*/ new Vector3();
|
|
@@ -52495,8 +52501,8 @@ class DirectionalLightHelper extends Object3D {
|
|
|
52495
52501
|
|
|
52496
52502
|
}
|
|
52497
52503
|
|
|
52498
|
-
}
|
|
52499
|
-
|
|
52504
|
+
}
|
|
52505
|
+
|
|
52500
52506
|
const _vector = /*@__PURE__*/ new Vector3();
|
|
52501
52507
|
const _camera = /*@__PURE__*/ new Camera();
|
|
52502
52508
|
|
|
@@ -52755,8 +52761,8 @@ function setPoint( point, pointMap, geometry, camera, x, y, z ) {
|
|
|
52755
52761
|
|
|
52756
52762
|
}
|
|
52757
52763
|
|
|
52758
|
-
}
|
|
52759
|
-
|
|
52764
|
+
}
|
|
52765
|
+
|
|
52760
52766
|
const _box = /*@__PURE__*/ new Box3();
|
|
52761
52767
|
|
|
52762
52768
|
class BoxHelper extends LineSegments {
|
|
@@ -52860,8 +52866,8 @@ class BoxHelper extends LineSegments {
|
|
|
52860
52866
|
|
|
52861
52867
|
}
|
|
52862
52868
|
|
|
52863
|
-
}
|
|
52864
|
-
|
|
52869
|
+
}
|
|
52870
|
+
|
|
52865
52871
|
class Box3Helper extends LineSegments {
|
|
52866
52872
|
|
|
52867
52873
|
constructor( box, color = 0xffff00 ) {
|
|
@@ -52909,8 +52915,8 @@ class Box3Helper extends LineSegments {
|
|
|
52909
52915
|
|
|
52910
52916
|
}
|
|
52911
52917
|
|
|
52912
|
-
}
|
|
52913
|
-
|
|
52918
|
+
}
|
|
52919
|
+
|
|
52914
52920
|
class PlaneHelper extends Line {
|
|
52915
52921
|
|
|
52916
52922
|
constructor( plane, size = 1, hex = 0xffff00 ) {
|
|
@@ -52964,8 +52970,8 @@ class PlaneHelper extends Line {
|
|
|
52964
52970
|
|
|
52965
52971
|
}
|
|
52966
52972
|
|
|
52967
|
-
}
|
|
52968
|
-
|
|
52973
|
+
}
|
|
52974
|
+
|
|
52969
52975
|
const _axis = /*@__PURE__*/ new Vector3();
|
|
52970
52976
|
let _lineGeometry, _coneGeometry;
|
|
52971
52977
|
|
|
@@ -53066,8 +53072,8 @@ class ArrowHelper extends Object3D {
|
|
|
53066
53072
|
|
|
53067
53073
|
}
|
|
53068
53074
|
|
|
53069
|
-
}
|
|
53070
|
-
|
|
53075
|
+
}
|
|
53076
|
+
|
|
53071
53077
|
class AxesHelper extends LineSegments {
|
|
53072
53078
|
|
|
53073
53079
|
constructor( size = 1 ) {
|
|
@@ -53126,8 +53132,8 @@ class AxesHelper extends LineSegments {
|
|
|
53126
53132
|
|
|
53127
53133
|
}
|
|
53128
53134
|
|
|
53129
|
-
}
|
|
53130
|
-
|
|
53135
|
+
}
|
|
53136
|
+
|
|
53131
53137
|
class ShapePath {
|
|
53132
53138
|
|
|
53133
53139
|
constructor() {
|
|
@@ -53410,8 +53416,8 @@ class ShapePath {
|
|
|
53410
53416
|
|
|
53411
53417
|
}
|
|
53412
53418
|
|
|
53413
|
-
}
|
|
53414
|
-
|
|
53419
|
+
}
|
|
53420
|
+
|
|
53415
53421
|
class WebGLMultipleRenderTargets extends WebGLRenderTarget { // @deprecated, r162
|
|
53416
53422
|
|
|
53417
53423
|
constructor( width = 1, height = 1, count = 1, options = {} ) {
|
|
@@ -53430,8 +53436,8 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget { // @deprecated, r16
|
|
|
53430
53436
|
|
|
53431
53437
|
}
|
|
53432
53438
|
|
|
53433
|
-
}
|
|
53434
|
-
|
|
53439
|
+
}
|
|
53440
|
+
|
|
53435
53441
|
if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
|
|
53436
53442
|
|
|
53437
53443
|
__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: {
|
|
@@ -53452,420 +53458,420 @@ if ( typeof window !== 'undefined' ) {
|
|
|
53452
53458
|
|
|
53453
53459
|
}
|
|
53454
53460
|
|
|
53455
|
-
}
|
|
53456
|
-
|
|
53457
|
-
exports.ACESFilmicToneMapping = ACESFilmicToneMapping;
|
|
53458
|
-
exports.AddEquation = AddEquation;
|
|
53459
|
-
exports.AddOperation = AddOperation;
|
|
53460
|
-
exports.AdditiveAnimationBlendMode = AdditiveAnimationBlendMode;
|
|
53461
|
-
exports.AdditiveBlending = AdditiveBlending;
|
|
53462
|
-
exports.AgXToneMapping = AgXToneMapping;
|
|
53463
|
-
exports.AlphaFormat = AlphaFormat;
|
|
53464
|
-
exports.AlwaysCompare = AlwaysCompare;
|
|
53465
|
-
exports.AlwaysDepth = AlwaysDepth;
|
|
53466
|
-
exports.AlwaysStencilFunc = AlwaysStencilFunc;
|
|
53467
|
-
exports.AmbientLight = AmbientLight;
|
|
53468
|
-
exports.AnimationAction = AnimationAction;
|
|
53469
|
-
exports.AnimationClip = AnimationClip;
|
|
53470
|
-
exports.AnimationLoader = AnimationLoader;
|
|
53471
|
-
exports.AnimationMixer = AnimationMixer;
|
|
53472
|
-
exports.AnimationObjectGroup = AnimationObjectGroup;
|
|
53473
|
-
exports.AnimationUtils = AnimationUtils;
|
|
53474
|
-
exports.ArcCurve = ArcCurve;
|
|
53475
|
-
exports.ArrayCamera = ArrayCamera;
|
|
53476
|
-
exports.ArrowHelper = ArrowHelper;
|
|
53477
|
-
exports.AttachedBindMode = AttachedBindMode;
|
|
53478
|
-
exports.Audio = Audio;
|
|
53479
|
-
exports.AudioAnalyser = AudioAnalyser;
|
|
53480
|
-
exports.AudioContext = AudioContext;
|
|
53481
|
-
exports.AudioListener = AudioListener;
|
|
53482
|
-
exports.AudioLoader = AudioLoader;
|
|
53483
|
-
exports.AxesHelper = AxesHelper;
|
|
53484
|
-
exports.BackSide = BackSide;
|
|
53485
|
-
exports.BasicDepthPacking = BasicDepthPacking;
|
|
53486
|
-
exports.BasicShadowMap = BasicShadowMap;
|
|
53487
|
-
exports.BatchedMesh = BatchedMesh;
|
|
53488
|
-
exports.Bone = Bone;
|
|
53489
|
-
exports.BooleanKeyframeTrack = BooleanKeyframeTrack;
|
|
53490
|
-
exports.Box2 = Box2;
|
|
53491
|
-
exports.Box3 = Box3;
|
|
53492
|
-
exports.Box3Helper = Box3Helper;
|
|
53493
|
-
exports.BoxGeometry = BoxGeometry;
|
|
53494
|
-
exports.BoxHelper = BoxHelper;
|
|
53495
|
-
exports.BufferAttribute = BufferAttribute;
|
|
53496
|
-
exports.BufferGeometry = BufferGeometry;
|
|
53497
|
-
exports.BufferGeometryLoader = BufferGeometryLoader;
|
|
53498
|
-
exports.ByteType = ByteType;
|
|
53499
|
-
exports.Cache = Cache;
|
|
53500
|
-
exports.Camera = Camera;
|
|
53501
|
-
exports.CameraHelper = CameraHelper;
|
|
53502
|
-
exports.CanvasTexture = CanvasTexture;
|
|
53503
|
-
exports.CapsuleGeometry = CapsuleGeometry;
|
|
53504
|
-
exports.CatmullRomCurve3 = CatmullRomCurve3;
|
|
53505
|
-
exports.CineonToneMapping = CineonToneMapping;
|
|
53506
|
-
exports.CircleGeometry = CircleGeometry;
|
|
53507
|
-
exports.ClampToEdgeWrapping = ClampToEdgeWrapping;
|
|
53508
|
-
exports.Clock = Clock;
|
|
53509
|
-
exports.Color = Color;
|
|
53510
|
-
exports.ColorKeyframeTrack = ColorKeyframeTrack;
|
|
53511
|
-
exports.ColorManagement = ColorManagement;
|
|
53512
|
-
exports.CompressedArrayTexture = CompressedArrayTexture;
|
|
53513
|
-
exports.CompressedCubeTexture = CompressedCubeTexture;
|
|
53514
|
-
exports.CompressedTexture = CompressedTexture;
|
|
53515
|
-
exports.CompressedTextureLoader = CompressedTextureLoader;
|
|
53516
|
-
exports.ConeGeometry = ConeGeometry;
|
|
53517
|
-
exports.ConstantAlphaFactor = ConstantAlphaFactor;
|
|
53518
|
-
exports.ConstantColorFactor = ConstantColorFactor;
|
|
53519
|
-
exports.CubeCamera = CubeCamera;
|
|
53520
|
-
exports.CubeReflectionMapping = CubeReflectionMapping;
|
|
53521
|
-
exports.CubeRefractionMapping = CubeRefractionMapping;
|
|
53522
|
-
exports.CubeTexture = CubeTexture;
|
|
53523
|
-
exports.CubeTextureLoader = CubeTextureLoader;
|
|
53524
|
-
exports.CubeUVReflectionMapping = CubeUVReflectionMapping;
|
|
53525
|
-
exports.CubicBezierCurve = CubicBezierCurve;
|
|
53526
|
-
exports.CubicBezierCurve3 = CubicBezierCurve3;
|
|
53527
|
-
exports.CubicInterpolant = CubicInterpolant;
|
|
53528
|
-
exports.CullFaceBack = CullFaceBack;
|
|
53529
|
-
exports.CullFaceFront = CullFaceFront;
|
|
53530
|
-
exports.CullFaceFrontBack = CullFaceFrontBack;
|
|
53531
|
-
exports.CullFaceNone = CullFaceNone;
|
|
53532
|
-
exports.Curve = Curve;
|
|
53533
|
-
exports.CurvePath = CurvePath;
|
|
53534
|
-
exports.CustomBlending = CustomBlending;
|
|
53535
|
-
exports.CustomToneMapping = CustomToneMapping;
|
|
53536
|
-
exports.CylinderGeometry = CylinderGeometry;
|
|
53537
|
-
exports.Cylindrical = Cylindrical;
|
|
53538
|
-
exports.Data3DTexture = Data3DTexture;
|
|
53539
|
-
exports.DataArrayTexture = DataArrayTexture;
|
|
53540
|
-
exports.DataTexture = DataTexture;
|
|
53541
|
-
exports.DataTextureLoader = DataTextureLoader;
|
|
53542
|
-
exports.DataUtils = DataUtils;
|
|
53543
|
-
exports.DecrementStencilOp = DecrementStencilOp;
|
|
53544
|
-
exports.DecrementWrapStencilOp = DecrementWrapStencilOp;
|
|
53545
|
-
exports.DefaultLoadingManager = DefaultLoadingManager;
|
|
53546
|
-
exports.DepthFormat = DepthFormat;
|
|
53547
|
-
exports.DepthStencilFormat = DepthStencilFormat;
|
|
53548
|
-
exports.DepthTexture = DepthTexture;
|
|
53549
|
-
exports.DetachedBindMode = DetachedBindMode;
|
|
53550
|
-
exports.DirectionalLight = DirectionalLight;
|
|
53551
|
-
exports.DirectionalLightHelper = DirectionalLightHelper;
|
|
53552
|
-
exports.DiscreteInterpolant = DiscreteInterpolant;
|
|
53553
|
-
exports.DisplayP3ColorSpace = DisplayP3ColorSpace;
|
|
53554
|
-
exports.DodecahedronGeometry = DodecahedronGeometry;
|
|
53555
|
-
exports.DoubleSide = DoubleSide;
|
|
53556
|
-
exports.DstAlphaFactor = DstAlphaFactor;
|
|
53557
|
-
exports.DstColorFactor = DstColorFactor;
|
|
53558
|
-
exports.DynamicCopyUsage = DynamicCopyUsage;
|
|
53559
|
-
exports.DynamicDrawUsage = DynamicDrawUsage;
|
|
53560
|
-
exports.DynamicReadUsage = DynamicReadUsage;
|
|
53561
|
-
exports.EdgesGeometry = EdgesGeometry;
|
|
53562
|
-
exports.EllipseCurve = EllipseCurve;
|
|
53563
|
-
exports.EqualCompare = EqualCompare;
|
|
53564
|
-
exports.EqualDepth = EqualDepth;
|
|
53565
|
-
exports.EqualStencilFunc = EqualStencilFunc;
|
|
53566
|
-
exports.EquirectangularReflectionMapping = EquirectangularReflectionMapping;
|
|
53567
|
-
exports.EquirectangularRefractionMapping = EquirectangularRefractionMapping;
|
|
53568
|
-
exports.Euler = Euler;
|
|
53569
|
-
exports.EventDispatcher = EventDispatcher;
|
|
53570
|
-
exports.ExtrudeGeometry = ExtrudeGeometry;
|
|
53571
|
-
exports.FileLoader = FileLoader;
|
|
53572
|
-
exports.Float16BufferAttribute = Float16BufferAttribute;
|
|
53573
|
-
exports.Float32BufferAttribute = Float32BufferAttribute;
|
|
53574
|
-
exports.FloatType = FloatType;
|
|
53575
|
-
exports.Fog = Fog;
|
|
53576
|
-
exports.FogExp2 = FogExp2;
|
|
53577
|
-
exports.FramebufferTexture = FramebufferTexture;
|
|
53578
|
-
exports.FrontSide = FrontSide;
|
|
53579
|
-
exports.Frustum = Frustum;
|
|
53580
|
-
exports.GLBufferAttribute = GLBufferAttribute;
|
|
53581
|
-
exports.GLSL1 = GLSL1;
|
|
53582
|
-
exports.GLSL3 = GLSL3;
|
|
53583
|
-
exports.GreaterCompare = GreaterCompare;
|
|
53584
|
-
exports.GreaterDepth = GreaterDepth;
|
|
53585
|
-
exports.GreaterEqualCompare = GreaterEqualCompare;
|
|
53586
|
-
exports.GreaterEqualDepth = GreaterEqualDepth;
|
|
53587
|
-
exports.GreaterEqualStencilFunc = GreaterEqualStencilFunc;
|
|
53588
|
-
exports.GreaterStencilFunc = GreaterStencilFunc;
|
|
53589
|
-
exports.GridHelper = GridHelper;
|
|
53590
|
-
exports.Group = Group;
|
|
53591
|
-
exports.HalfFloatType = HalfFloatType;
|
|
53592
|
-
exports.HemisphereLight = HemisphereLight;
|
|
53593
|
-
exports.HemisphereLightHelper = HemisphereLightHelper;
|
|
53594
|
-
exports.IcosahedronGeometry = IcosahedronGeometry;
|
|
53595
|
-
exports.ImageBitmapLoader = ImageBitmapLoader;
|
|
53596
|
-
exports.ImageLoader = ImageLoader;
|
|
53597
|
-
exports.ImageUtils = ImageUtils;
|
|
53598
|
-
exports.IncrementStencilOp = IncrementStencilOp;
|
|
53599
|
-
exports.IncrementWrapStencilOp = IncrementWrapStencilOp;
|
|
53600
|
-
exports.InstancedBufferAttribute = InstancedBufferAttribute;
|
|
53601
|
-
exports.InstancedBufferGeometry = InstancedBufferGeometry;
|
|
53602
|
-
exports.InstancedInterleavedBuffer = InstancedInterleavedBuffer;
|
|
53603
|
-
exports.InstancedMesh = InstancedMesh;
|
|
53604
|
-
exports.Int16BufferAttribute = Int16BufferAttribute;
|
|
53605
|
-
exports.Int32BufferAttribute = Int32BufferAttribute;
|
|
53606
|
-
exports.Int8BufferAttribute = Int8BufferAttribute;
|
|
53607
|
-
exports.IntType = IntType;
|
|
53608
|
-
exports.InterleavedBuffer = InterleavedBuffer;
|
|
53609
|
-
exports.InterleavedBufferAttribute = InterleavedBufferAttribute;
|
|
53610
|
-
exports.Interpolant = Interpolant;
|
|
53611
|
-
exports.InterpolateDiscrete = InterpolateDiscrete;
|
|
53612
|
-
exports.InterpolateLinear = InterpolateLinear;
|
|
53613
|
-
exports.InterpolateSmooth = InterpolateSmooth;
|
|
53614
|
-
exports.InvertStencilOp = InvertStencilOp;
|
|
53615
|
-
exports.KeepStencilOp = KeepStencilOp;
|
|
53616
|
-
exports.KeyframeTrack = KeyframeTrack;
|
|
53617
|
-
exports.LOD = LOD;
|
|
53618
|
-
exports.LatheGeometry = LatheGeometry;
|
|
53619
|
-
exports.Layers = Layers;
|
|
53620
|
-
exports.LessCompare = LessCompare;
|
|
53621
|
-
exports.LessDepth = LessDepth;
|
|
53622
|
-
exports.LessEqualCompare = LessEqualCompare;
|
|
53623
|
-
exports.LessEqualDepth = LessEqualDepth;
|
|
53624
|
-
exports.LessEqualStencilFunc = LessEqualStencilFunc;
|
|
53625
|
-
exports.LessStencilFunc = LessStencilFunc;
|
|
53626
|
-
exports.Light = Light;
|
|
53627
|
-
exports.LightProbe = LightProbe;
|
|
53628
|
-
exports.Line = Line;
|
|
53629
|
-
exports.Line3 = Line3;
|
|
53630
|
-
exports.LineBasicMaterial = LineBasicMaterial;
|
|
53631
|
-
exports.LineCurve = LineCurve;
|
|
53632
|
-
exports.LineCurve3 = LineCurve3;
|
|
53633
|
-
exports.LineDashedMaterial = LineDashedMaterial;
|
|
53634
|
-
exports.LineLoop = LineLoop;
|
|
53635
|
-
exports.LineSegments = LineSegments;
|
|
53636
|
-
exports.LinearDisplayP3ColorSpace = LinearDisplayP3ColorSpace;
|
|
53637
|
-
exports.LinearEncoding = LinearEncoding;
|
|
53638
|
-
exports.LinearFilter = LinearFilter;
|
|
53639
|
-
exports.LinearInterpolant = LinearInterpolant;
|
|
53640
|
-
exports.LinearMipMapLinearFilter = LinearMipMapLinearFilter;
|
|
53641
|
-
exports.LinearMipMapNearestFilter = LinearMipMapNearestFilter;
|
|
53642
|
-
exports.LinearMipmapLinearFilter = LinearMipmapLinearFilter;
|
|
53643
|
-
exports.LinearMipmapNearestFilter = LinearMipmapNearestFilter;
|
|
53644
|
-
exports.LinearSRGBColorSpace = LinearSRGBColorSpace;
|
|
53645
|
-
exports.LinearToneMapping = LinearToneMapping;
|
|
53646
|
-
exports.LinearTransfer = LinearTransfer;
|
|
53647
|
-
exports.Loader = Loader;
|
|
53648
|
-
exports.LoaderUtils = LoaderUtils;
|
|
53649
|
-
exports.LoadingManager = LoadingManager;
|
|
53650
|
-
exports.LoopOnce = LoopOnce;
|
|
53651
|
-
exports.LoopPingPong = LoopPingPong;
|
|
53652
|
-
exports.LoopRepeat = LoopRepeat;
|
|
53653
|
-
exports.LuminanceAlphaFormat = LuminanceAlphaFormat;
|
|
53654
|
-
exports.LuminanceFormat = LuminanceFormat;
|
|
53655
|
-
exports.MOUSE = MOUSE;
|
|
53656
|
-
exports.Material = Material;
|
|
53657
|
-
exports.MaterialLoader = MaterialLoader;
|
|
53658
|
-
exports.MathUtils = MathUtils;
|
|
53659
|
-
exports.Matrix3 = Matrix3;
|
|
53660
|
-
exports.Matrix4 = Matrix4;
|
|
53661
|
-
exports.MaxEquation = MaxEquation;
|
|
53662
|
-
exports.Mesh = Mesh;
|
|
53663
|
-
exports.MeshBasicMaterial = MeshBasicMaterial;
|
|
53664
|
-
exports.MeshDepthMaterial = MeshDepthMaterial;
|
|
53665
|
-
exports.MeshDistanceMaterial = MeshDistanceMaterial;
|
|
53666
|
-
exports.MeshLambertMaterial = MeshLambertMaterial;
|
|
53667
|
-
exports.MeshMatcapMaterial = MeshMatcapMaterial;
|
|
53668
|
-
exports.MeshNormalMaterial = MeshNormalMaterial;
|
|
53669
|
-
exports.MeshPhongMaterial = MeshPhongMaterial;
|
|
53670
|
-
exports.MeshPhysicalMaterial = MeshPhysicalMaterial;
|
|
53671
|
-
exports.MeshStandardMaterial = MeshStandardMaterial;
|
|
53672
|
-
exports.MeshToonMaterial = MeshToonMaterial;
|
|
53673
|
-
exports.MinEquation = MinEquation;
|
|
53674
|
-
exports.MirroredRepeatWrapping = MirroredRepeatWrapping;
|
|
53675
|
-
exports.MixOperation = MixOperation;
|
|
53676
|
-
exports.MultiplyBlending = MultiplyBlending;
|
|
53677
|
-
exports.MultiplyOperation = MultiplyOperation;
|
|
53678
|
-
exports.NearestFilter = NearestFilter;
|
|
53679
|
-
exports.NearestMipMapLinearFilter = NearestMipMapLinearFilter;
|
|
53680
|
-
exports.NearestMipMapNearestFilter = NearestMipMapNearestFilter;
|
|
53681
|
-
exports.NearestMipmapLinearFilter = NearestMipmapLinearFilter;
|
|
53682
|
-
exports.NearestMipmapNearestFilter = NearestMipmapNearestFilter;
|
|
53683
|
-
exports.NeutralToneMapping = NeutralToneMapping;
|
|
53684
|
-
exports.NeverCompare = NeverCompare;
|
|
53685
|
-
exports.NeverDepth = NeverDepth;
|
|
53686
|
-
exports.NeverStencilFunc = NeverStencilFunc;
|
|
53687
|
-
exports.NoBlending = NoBlending;
|
|
53688
|
-
exports.NoColorSpace = NoColorSpace;
|
|
53689
|
-
exports.NoToneMapping = NoToneMapping;
|
|
53690
|
-
exports.NormalAnimationBlendMode = NormalAnimationBlendMode;
|
|
53691
|
-
exports.NormalBlending = NormalBlending;
|
|
53692
|
-
exports.NotEqualCompare = NotEqualCompare;
|
|
53693
|
-
exports.NotEqualDepth = NotEqualDepth;
|
|
53694
|
-
exports.NotEqualStencilFunc = NotEqualStencilFunc;
|
|
53695
|
-
exports.NumberKeyframeTrack = NumberKeyframeTrack;
|
|
53696
|
-
exports.Object3D = Object3D;
|
|
53697
|
-
exports.ObjectLoader = ObjectLoader;
|
|
53698
|
-
exports.ObjectSpaceNormalMap = ObjectSpaceNormalMap;
|
|
53699
|
-
exports.OctahedronGeometry = OctahedronGeometry;
|
|
53700
|
-
exports.OneFactor = OneFactor;
|
|
53701
|
-
exports.OneMinusConstantAlphaFactor = OneMinusConstantAlphaFactor;
|
|
53702
|
-
exports.OneMinusConstantColorFactor = OneMinusConstantColorFactor;
|
|
53703
|
-
exports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor;
|
|
53704
|
-
exports.OneMinusDstColorFactor = OneMinusDstColorFactor;
|
|
53705
|
-
exports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor;
|
|
53706
|
-
exports.OneMinusSrcColorFactor = OneMinusSrcColorFactor;
|
|
53707
|
-
exports.OrthographicCamera = OrthographicCamera;
|
|
53708
|
-
exports.P3Primaries = P3Primaries;
|
|
53709
|
-
exports.PCFShadowMap = PCFShadowMap;
|
|
53710
|
-
exports.PCFSoftShadowMap = PCFSoftShadowMap;
|
|
53711
|
-
exports.PMREMGenerator = PMREMGenerator;
|
|
53712
|
-
exports.Path = Path;
|
|
53713
|
-
exports.PerspectiveCamera = PerspectiveCamera;
|
|
53714
|
-
exports.Plane = Plane;
|
|
53715
|
-
exports.PlaneGeometry = PlaneGeometry;
|
|
53716
|
-
exports.PlaneHelper = PlaneHelper;
|
|
53717
|
-
exports.PointLight = PointLight;
|
|
53718
|
-
exports.PointLightHelper = PointLightHelper;
|
|
53719
|
-
exports.Points = Points;
|
|
53720
|
-
exports.PointsMaterial = PointsMaterial;
|
|
53721
|
-
exports.PolarGridHelper = PolarGridHelper;
|
|
53722
|
-
exports.PolyhedronGeometry = PolyhedronGeometry;
|
|
53723
|
-
exports.PositionalAudio = PositionalAudio;
|
|
53724
|
-
exports.PropertyBinding = PropertyBinding;
|
|
53725
|
-
exports.PropertyMixer = PropertyMixer;
|
|
53726
|
-
exports.QuadraticBezierCurve = QuadraticBezierCurve;
|
|
53727
|
-
exports.QuadraticBezierCurve3 = QuadraticBezierCurve3;
|
|
53728
|
-
exports.Quaternion = Quaternion;
|
|
53729
|
-
exports.QuaternionKeyframeTrack = QuaternionKeyframeTrack;
|
|
53730
|
-
exports.QuaternionLinearInterpolant = QuaternionLinearInterpolant;
|
|
53731
|
-
exports.RED_GREEN_RGTC2_Format = RED_GREEN_RGTC2_Format;
|
|
53732
|
-
exports.RED_RGTC1_Format = RED_RGTC1_Format;
|
|
53733
|
-
exports.REVISION = REVISION;
|
|
53734
|
-
exports.RGBADepthPacking = RGBADepthPacking;
|
|
53735
|
-
exports.RGBAFormat = RGBAFormat;
|
|
53736
|
-
exports.RGBAIntegerFormat = RGBAIntegerFormat;
|
|
53737
|
-
exports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format;
|
|
53738
|
-
exports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format;
|
|
53739
|
-
exports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format;
|
|
53740
|
-
exports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format;
|
|
53741
|
-
exports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format;
|
|
53742
|
-
exports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format;
|
|
53743
|
-
exports.RGBA_ASTC_4x4_Format = RGBA_ASTC_4x4_Format;
|
|
53744
|
-
exports.RGBA_ASTC_5x4_Format = RGBA_ASTC_5x4_Format;
|
|
53745
|
-
exports.RGBA_ASTC_5x5_Format = RGBA_ASTC_5x5_Format;
|
|
53746
|
-
exports.RGBA_ASTC_6x5_Format = RGBA_ASTC_6x5_Format;
|
|
53747
|
-
exports.RGBA_ASTC_6x6_Format = RGBA_ASTC_6x6_Format;
|
|
53748
|
-
exports.RGBA_ASTC_8x5_Format = RGBA_ASTC_8x5_Format;
|
|
53749
|
-
exports.RGBA_ASTC_8x6_Format = RGBA_ASTC_8x6_Format;
|
|
53750
|
-
exports.RGBA_ASTC_8x8_Format = RGBA_ASTC_8x8_Format;
|
|
53751
|
-
exports.RGBA_BPTC_Format = RGBA_BPTC_Format;
|
|
53752
|
-
exports.RGBA_ETC2_EAC_Format = RGBA_ETC2_EAC_Format;
|
|
53753
|
-
exports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format;
|
|
53754
|
-
exports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format;
|
|
53755
|
-
exports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format;
|
|
53756
|
-
exports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format;
|
|
53757
|
-
exports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format;
|
|
53758
|
-
exports.RGB_BPTC_SIGNED_Format = RGB_BPTC_SIGNED_Format;
|
|
53759
|
-
exports.RGB_BPTC_UNSIGNED_Format = RGB_BPTC_UNSIGNED_Format;
|
|
53760
|
-
exports.RGB_ETC1_Format = RGB_ETC1_Format;
|
|
53761
|
-
exports.RGB_ETC2_Format = RGB_ETC2_Format;
|
|
53762
|
-
exports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format;
|
|
53763
|
-
exports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format;
|
|
53764
|
-
exports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format;
|
|
53765
|
-
exports.RGFormat = RGFormat;
|
|
53766
|
-
exports.RGIntegerFormat = RGIntegerFormat;
|
|
53767
|
-
exports.RawShaderMaterial = RawShaderMaterial;
|
|
53768
|
-
exports.Ray = Ray;
|
|
53769
|
-
exports.Raycaster = Raycaster;
|
|
53770
|
-
exports.Rec709Primaries = Rec709Primaries;
|
|
53771
|
-
exports.RectAreaLight = RectAreaLight;
|
|
53772
|
-
exports.RedFormat = RedFormat;
|
|
53773
|
-
exports.RedIntegerFormat = RedIntegerFormat;
|
|
53774
|
-
exports.ReinhardToneMapping = ReinhardToneMapping;
|
|
53775
|
-
exports.RenderTarget = RenderTarget;
|
|
53776
|
-
exports.RepeatWrapping = RepeatWrapping;
|
|
53777
|
-
exports.ReplaceStencilOp = ReplaceStencilOp;
|
|
53778
|
-
exports.ReverseSubtractEquation = ReverseSubtractEquation;
|
|
53779
|
-
exports.RingGeometry = RingGeometry;
|
|
53780
|
-
exports.SIGNED_RED_GREEN_RGTC2_Format = SIGNED_RED_GREEN_RGTC2_Format;
|
|
53781
|
-
exports.SIGNED_RED_RGTC1_Format = SIGNED_RED_RGTC1_Format;
|
|
53782
|
-
exports.SRGBColorSpace = SRGBColorSpace;
|
|
53783
|
-
exports.SRGBTransfer = SRGBTransfer;
|
|
53784
|
-
exports.Scene = Scene;
|
|
53785
|
-
exports.ShaderChunk = ShaderChunk;
|
|
53786
|
-
exports.ShaderLib = ShaderLib;
|
|
53787
|
-
exports.ShaderMaterial = ShaderMaterial;
|
|
53788
|
-
exports.ShadowMaterial = ShadowMaterial;
|
|
53789
|
-
exports.Shape = Shape;
|
|
53790
|
-
exports.ShapeGeometry = ShapeGeometry;
|
|
53791
|
-
exports.ShapePath = ShapePath;
|
|
53792
|
-
exports.ShapeUtils = ShapeUtils;
|
|
53793
|
-
exports.ShortType = ShortType;
|
|
53794
|
-
exports.Skeleton = Skeleton;
|
|
53795
|
-
exports.SkeletonHelper = SkeletonHelper;
|
|
53796
|
-
exports.SkinnedMesh = SkinnedMesh;
|
|
53797
|
-
exports.Source = Source;
|
|
53798
|
-
exports.Sphere = Sphere;
|
|
53799
|
-
exports.SphereGeometry = SphereGeometry;
|
|
53800
|
-
exports.Spherical = Spherical;
|
|
53801
|
-
exports.SphericalHarmonics3 = SphericalHarmonics3;
|
|
53802
|
-
exports.SplineCurve = SplineCurve;
|
|
53803
|
-
exports.SpotLight = SpotLight;
|
|
53804
|
-
exports.SpotLightHelper = SpotLightHelper;
|
|
53805
|
-
exports.Sprite = Sprite;
|
|
53806
|
-
exports.SpriteMaterial = SpriteMaterial;
|
|
53807
|
-
exports.SrcAlphaFactor = SrcAlphaFactor;
|
|
53808
|
-
exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor;
|
|
53809
|
-
exports.SrcColorFactor = SrcColorFactor;
|
|
53810
|
-
exports.StaticCopyUsage = StaticCopyUsage;
|
|
53811
|
-
exports.StaticDrawUsage = StaticDrawUsage;
|
|
53812
|
-
exports.StaticReadUsage = StaticReadUsage;
|
|
53813
|
-
exports.StereoCamera = StereoCamera;
|
|
53814
|
-
exports.StreamCopyUsage = StreamCopyUsage;
|
|
53815
|
-
exports.StreamDrawUsage = StreamDrawUsage;
|
|
53816
|
-
exports.StreamReadUsage = StreamReadUsage;
|
|
53817
|
-
exports.StringKeyframeTrack = StringKeyframeTrack;
|
|
53818
|
-
exports.SubtractEquation = SubtractEquation;
|
|
53819
|
-
exports.SubtractiveBlending = SubtractiveBlending;
|
|
53820
|
-
exports.TOUCH = TOUCH;
|
|
53821
|
-
exports.TangentSpaceNormalMap = TangentSpaceNormalMap;
|
|
53822
|
-
exports.TetrahedronGeometry = TetrahedronGeometry;
|
|
53823
|
-
exports.Texture = Texture;
|
|
53824
|
-
exports.TextureLoader = TextureLoader;
|
|
53825
|
-
exports.TorusGeometry = TorusGeometry;
|
|
53826
|
-
exports.TorusKnotGeometry = TorusKnotGeometry;
|
|
53827
|
-
exports.Triangle = Triangle;
|
|
53828
|
-
exports.TriangleFanDrawMode = TriangleFanDrawMode;
|
|
53829
|
-
exports.TriangleStripDrawMode = TriangleStripDrawMode;
|
|
53830
|
-
exports.TrianglesDrawMode = TrianglesDrawMode;
|
|
53831
|
-
exports.TubeGeometry = TubeGeometry;
|
|
53832
|
-
exports.UVMapping = UVMapping;
|
|
53833
|
-
exports.Uint16BufferAttribute = Uint16BufferAttribute;
|
|
53834
|
-
exports.Uint32BufferAttribute = Uint32BufferAttribute;
|
|
53835
|
-
exports.Uint8BufferAttribute = Uint8BufferAttribute;
|
|
53836
|
-
exports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute;
|
|
53837
|
-
exports.Uniform = Uniform;
|
|
53838
|
-
exports.UniformsGroup = UniformsGroup;
|
|
53839
|
-
exports.UniformsLib = UniformsLib;
|
|
53840
|
-
exports.UniformsUtils = UniformsUtils;
|
|
53841
|
-
exports.UnsignedByteType = UnsignedByteType;
|
|
53842
|
-
exports.UnsignedInt248Type = UnsignedInt248Type;
|
|
53843
|
-
exports.UnsignedIntType = UnsignedIntType;
|
|
53844
|
-
exports.UnsignedShort4444Type = UnsignedShort4444Type;
|
|
53845
|
-
exports.UnsignedShort5551Type = UnsignedShort5551Type;
|
|
53846
|
-
exports.UnsignedShortType = UnsignedShortType;
|
|
53847
|
-
exports.VSMShadowMap = VSMShadowMap;
|
|
53848
|
-
exports.Vector2 = Vector2;
|
|
53849
|
-
exports.Vector3 = Vector3;
|
|
53850
|
-
exports.Vector4 = Vector4;
|
|
53851
|
-
exports.VectorKeyframeTrack = VectorKeyframeTrack;
|
|
53852
|
-
exports.VideoTexture = VideoTexture;
|
|
53853
|
-
exports.WebGL1Renderer = WebGL1Renderer;
|
|
53854
|
-
exports.WebGL3DRenderTarget = WebGL3DRenderTarget;
|
|
53855
|
-
exports.WebGLArrayRenderTarget = WebGLArrayRenderTarget;
|
|
53856
|
-
exports.WebGLCoordinateSystem = WebGLCoordinateSystem;
|
|
53857
|
-
exports.WebGLCubeRenderTarget = WebGLCubeRenderTarget;
|
|
53858
|
-
exports.WebGLMultipleRenderTargets = WebGLMultipleRenderTargets;
|
|
53859
|
-
exports.WebGLRenderTarget = WebGLRenderTarget;
|
|
53860
|
-
exports.WebGLRenderer = WebGLRenderer;
|
|
53861
|
-
exports.WebGLUtils = WebGLUtils;
|
|
53862
|
-
exports.WebGPUCoordinateSystem = WebGPUCoordinateSystem;
|
|
53863
|
-
exports.WireframeGeometry = WireframeGeometry;
|
|
53864
|
-
exports.WrapAroundEnding = WrapAroundEnding;
|
|
53865
|
-
exports.ZeroCurvatureEnding = ZeroCurvatureEnding;
|
|
53866
|
-
exports.ZeroFactor = ZeroFactor;
|
|
53867
|
-
exports.ZeroSlopeEnding = ZeroSlopeEnding;
|
|
53868
|
-
exports.ZeroStencilOp = ZeroStencilOp;
|
|
53869
|
-
exports._SRGBAFormat = _SRGBAFormat;
|
|
53870
|
-
exports.createCanvasElement = createCanvasElement;
|
|
53871
|
-
exports.sRGBEncoding = sRGBEncoding;
|
|
53461
|
+
}
|
|
53462
|
+
|
|
53463
|
+
exports.ACESFilmicToneMapping = ACESFilmicToneMapping;
|
|
53464
|
+
exports.AddEquation = AddEquation;
|
|
53465
|
+
exports.AddOperation = AddOperation;
|
|
53466
|
+
exports.AdditiveAnimationBlendMode = AdditiveAnimationBlendMode;
|
|
53467
|
+
exports.AdditiveBlending = AdditiveBlending;
|
|
53468
|
+
exports.AgXToneMapping = AgXToneMapping;
|
|
53469
|
+
exports.AlphaFormat = AlphaFormat;
|
|
53470
|
+
exports.AlwaysCompare = AlwaysCompare;
|
|
53471
|
+
exports.AlwaysDepth = AlwaysDepth;
|
|
53472
|
+
exports.AlwaysStencilFunc = AlwaysStencilFunc;
|
|
53473
|
+
exports.AmbientLight = AmbientLight;
|
|
53474
|
+
exports.AnimationAction = AnimationAction;
|
|
53475
|
+
exports.AnimationClip = AnimationClip;
|
|
53476
|
+
exports.AnimationLoader = AnimationLoader;
|
|
53477
|
+
exports.AnimationMixer = AnimationMixer;
|
|
53478
|
+
exports.AnimationObjectGroup = AnimationObjectGroup;
|
|
53479
|
+
exports.AnimationUtils = AnimationUtils;
|
|
53480
|
+
exports.ArcCurve = ArcCurve;
|
|
53481
|
+
exports.ArrayCamera = ArrayCamera;
|
|
53482
|
+
exports.ArrowHelper = ArrowHelper;
|
|
53483
|
+
exports.AttachedBindMode = AttachedBindMode;
|
|
53484
|
+
exports.Audio = Audio;
|
|
53485
|
+
exports.AudioAnalyser = AudioAnalyser;
|
|
53486
|
+
exports.AudioContext = AudioContext;
|
|
53487
|
+
exports.AudioListener = AudioListener;
|
|
53488
|
+
exports.AudioLoader = AudioLoader;
|
|
53489
|
+
exports.AxesHelper = AxesHelper;
|
|
53490
|
+
exports.BackSide = BackSide;
|
|
53491
|
+
exports.BasicDepthPacking = BasicDepthPacking;
|
|
53492
|
+
exports.BasicShadowMap = BasicShadowMap;
|
|
53493
|
+
exports.BatchedMesh = BatchedMesh;
|
|
53494
|
+
exports.Bone = Bone;
|
|
53495
|
+
exports.BooleanKeyframeTrack = BooleanKeyframeTrack;
|
|
53496
|
+
exports.Box2 = Box2;
|
|
53497
|
+
exports.Box3 = Box3;
|
|
53498
|
+
exports.Box3Helper = Box3Helper;
|
|
53499
|
+
exports.BoxGeometry = BoxGeometry;
|
|
53500
|
+
exports.BoxHelper = BoxHelper;
|
|
53501
|
+
exports.BufferAttribute = BufferAttribute;
|
|
53502
|
+
exports.BufferGeometry = BufferGeometry;
|
|
53503
|
+
exports.BufferGeometryLoader = BufferGeometryLoader;
|
|
53504
|
+
exports.ByteType = ByteType;
|
|
53505
|
+
exports.Cache = Cache;
|
|
53506
|
+
exports.Camera = Camera;
|
|
53507
|
+
exports.CameraHelper = CameraHelper;
|
|
53508
|
+
exports.CanvasTexture = CanvasTexture;
|
|
53509
|
+
exports.CapsuleGeometry = CapsuleGeometry;
|
|
53510
|
+
exports.CatmullRomCurve3 = CatmullRomCurve3;
|
|
53511
|
+
exports.CineonToneMapping = CineonToneMapping;
|
|
53512
|
+
exports.CircleGeometry = CircleGeometry;
|
|
53513
|
+
exports.ClampToEdgeWrapping = ClampToEdgeWrapping;
|
|
53514
|
+
exports.Clock = Clock;
|
|
53515
|
+
exports.Color = Color;
|
|
53516
|
+
exports.ColorKeyframeTrack = ColorKeyframeTrack;
|
|
53517
|
+
exports.ColorManagement = ColorManagement;
|
|
53518
|
+
exports.CompressedArrayTexture = CompressedArrayTexture;
|
|
53519
|
+
exports.CompressedCubeTexture = CompressedCubeTexture;
|
|
53520
|
+
exports.CompressedTexture = CompressedTexture;
|
|
53521
|
+
exports.CompressedTextureLoader = CompressedTextureLoader;
|
|
53522
|
+
exports.ConeGeometry = ConeGeometry;
|
|
53523
|
+
exports.ConstantAlphaFactor = ConstantAlphaFactor;
|
|
53524
|
+
exports.ConstantColorFactor = ConstantColorFactor;
|
|
53525
|
+
exports.CubeCamera = CubeCamera;
|
|
53526
|
+
exports.CubeReflectionMapping = CubeReflectionMapping;
|
|
53527
|
+
exports.CubeRefractionMapping = CubeRefractionMapping;
|
|
53528
|
+
exports.CubeTexture = CubeTexture;
|
|
53529
|
+
exports.CubeTextureLoader = CubeTextureLoader;
|
|
53530
|
+
exports.CubeUVReflectionMapping = CubeUVReflectionMapping;
|
|
53531
|
+
exports.CubicBezierCurve = CubicBezierCurve;
|
|
53532
|
+
exports.CubicBezierCurve3 = CubicBezierCurve3;
|
|
53533
|
+
exports.CubicInterpolant = CubicInterpolant;
|
|
53534
|
+
exports.CullFaceBack = CullFaceBack;
|
|
53535
|
+
exports.CullFaceFront = CullFaceFront;
|
|
53536
|
+
exports.CullFaceFrontBack = CullFaceFrontBack;
|
|
53537
|
+
exports.CullFaceNone = CullFaceNone;
|
|
53538
|
+
exports.Curve = Curve;
|
|
53539
|
+
exports.CurvePath = CurvePath;
|
|
53540
|
+
exports.CustomBlending = CustomBlending;
|
|
53541
|
+
exports.CustomToneMapping = CustomToneMapping;
|
|
53542
|
+
exports.CylinderGeometry = CylinderGeometry;
|
|
53543
|
+
exports.Cylindrical = Cylindrical;
|
|
53544
|
+
exports.Data3DTexture = Data3DTexture;
|
|
53545
|
+
exports.DataArrayTexture = DataArrayTexture;
|
|
53546
|
+
exports.DataTexture = DataTexture;
|
|
53547
|
+
exports.DataTextureLoader = DataTextureLoader;
|
|
53548
|
+
exports.DataUtils = DataUtils;
|
|
53549
|
+
exports.DecrementStencilOp = DecrementStencilOp;
|
|
53550
|
+
exports.DecrementWrapStencilOp = DecrementWrapStencilOp;
|
|
53551
|
+
exports.DefaultLoadingManager = DefaultLoadingManager;
|
|
53552
|
+
exports.DepthFormat = DepthFormat;
|
|
53553
|
+
exports.DepthStencilFormat = DepthStencilFormat;
|
|
53554
|
+
exports.DepthTexture = DepthTexture;
|
|
53555
|
+
exports.DetachedBindMode = DetachedBindMode;
|
|
53556
|
+
exports.DirectionalLight = DirectionalLight;
|
|
53557
|
+
exports.DirectionalLightHelper = DirectionalLightHelper;
|
|
53558
|
+
exports.DiscreteInterpolant = DiscreteInterpolant;
|
|
53559
|
+
exports.DisplayP3ColorSpace = DisplayP3ColorSpace;
|
|
53560
|
+
exports.DodecahedronGeometry = DodecahedronGeometry;
|
|
53561
|
+
exports.DoubleSide = DoubleSide;
|
|
53562
|
+
exports.DstAlphaFactor = DstAlphaFactor;
|
|
53563
|
+
exports.DstColorFactor = DstColorFactor;
|
|
53564
|
+
exports.DynamicCopyUsage = DynamicCopyUsage;
|
|
53565
|
+
exports.DynamicDrawUsage = DynamicDrawUsage;
|
|
53566
|
+
exports.DynamicReadUsage = DynamicReadUsage;
|
|
53567
|
+
exports.EdgesGeometry = EdgesGeometry;
|
|
53568
|
+
exports.EllipseCurve = EllipseCurve;
|
|
53569
|
+
exports.EqualCompare = EqualCompare;
|
|
53570
|
+
exports.EqualDepth = EqualDepth;
|
|
53571
|
+
exports.EqualStencilFunc = EqualStencilFunc;
|
|
53572
|
+
exports.EquirectangularReflectionMapping = EquirectangularReflectionMapping;
|
|
53573
|
+
exports.EquirectangularRefractionMapping = EquirectangularRefractionMapping;
|
|
53574
|
+
exports.Euler = Euler;
|
|
53575
|
+
exports.EventDispatcher = EventDispatcher;
|
|
53576
|
+
exports.ExtrudeGeometry = ExtrudeGeometry;
|
|
53577
|
+
exports.FileLoader = FileLoader;
|
|
53578
|
+
exports.Float16BufferAttribute = Float16BufferAttribute;
|
|
53579
|
+
exports.Float32BufferAttribute = Float32BufferAttribute;
|
|
53580
|
+
exports.FloatType = FloatType;
|
|
53581
|
+
exports.Fog = Fog;
|
|
53582
|
+
exports.FogExp2 = FogExp2;
|
|
53583
|
+
exports.FramebufferTexture = FramebufferTexture;
|
|
53584
|
+
exports.FrontSide = FrontSide;
|
|
53585
|
+
exports.Frustum = Frustum;
|
|
53586
|
+
exports.GLBufferAttribute = GLBufferAttribute;
|
|
53587
|
+
exports.GLSL1 = GLSL1;
|
|
53588
|
+
exports.GLSL3 = GLSL3;
|
|
53589
|
+
exports.GreaterCompare = GreaterCompare;
|
|
53590
|
+
exports.GreaterDepth = GreaterDepth;
|
|
53591
|
+
exports.GreaterEqualCompare = GreaterEqualCompare;
|
|
53592
|
+
exports.GreaterEqualDepth = GreaterEqualDepth;
|
|
53593
|
+
exports.GreaterEqualStencilFunc = GreaterEqualStencilFunc;
|
|
53594
|
+
exports.GreaterStencilFunc = GreaterStencilFunc;
|
|
53595
|
+
exports.GridHelper = GridHelper;
|
|
53596
|
+
exports.Group = Group;
|
|
53597
|
+
exports.HalfFloatType = HalfFloatType;
|
|
53598
|
+
exports.HemisphereLight = HemisphereLight;
|
|
53599
|
+
exports.HemisphereLightHelper = HemisphereLightHelper;
|
|
53600
|
+
exports.IcosahedronGeometry = IcosahedronGeometry;
|
|
53601
|
+
exports.ImageBitmapLoader = ImageBitmapLoader;
|
|
53602
|
+
exports.ImageLoader = ImageLoader;
|
|
53603
|
+
exports.ImageUtils = ImageUtils;
|
|
53604
|
+
exports.IncrementStencilOp = IncrementStencilOp;
|
|
53605
|
+
exports.IncrementWrapStencilOp = IncrementWrapStencilOp;
|
|
53606
|
+
exports.InstancedBufferAttribute = InstancedBufferAttribute;
|
|
53607
|
+
exports.InstancedBufferGeometry = InstancedBufferGeometry;
|
|
53608
|
+
exports.InstancedInterleavedBuffer = InstancedInterleavedBuffer;
|
|
53609
|
+
exports.InstancedMesh = InstancedMesh;
|
|
53610
|
+
exports.Int16BufferAttribute = Int16BufferAttribute;
|
|
53611
|
+
exports.Int32BufferAttribute = Int32BufferAttribute;
|
|
53612
|
+
exports.Int8BufferAttribute = Int8BufferAttribute;
|
|
53613
|
+
exports.IntType = IntType;
|
|
53614
|
+
exports.InterleavedBuffer = InterleavedBuffer;
|
|
53615
|
+
exports.InterleavedBufferAttribute = InterleavedBufferAttribute;
|
|
53616
|
+
exports.Interpolant = Interpolant;
|
|
53617
|
+
exports.InterpolateDiscrete = InterpolateDiscrete;
|
|
53618
|
+
exports.InterpolateLinear = InterpolateLinear;
|
|
53619
|
+
exports.InterpolateSmooth = InterpolateSmooth;
|
|
53620
|
+
exports.InvertStencilOp = InvertStencilOp;
|
|
53621
|
+
exports.KeepStencilOp = KeepStencilOp;
|
|
53622
|
+
exports.KeyframeTrack = KeyframeTrack;
|
|
53623
|
+
exports.LOD = LOD;
|
|
53624
|
+
exports.LatheGeometry = LatheGeometry;
|
|
53625
|
+
exports.Layers = Layers;
|
|
53626
|
+
exports.LessCompare = LessCompare;
|
|
53627
|
+
exports.LessDepth = LessDepth;
|
|
53628
|
+
exports.LessEqualCompare = LessEqualCompare;
|
|
53629
|
+
exports.LessEqualDepth = LessEqualDepth;
|
|
53630
|
+
exports.LessEqualStencilFunc = LessEqualStencilFunc;
|
|
53631
|
+
exports.LessStencilFunc = LessStencilFunc;
|
|
53632
|
+
exports.Light = Light;
|
|
53633
|
+
exports.LightProbe = LightProbe;
|
|
53634
|
+
exports.Line = Line;
|
|
53635
|
+
exports.Line3 = Line3;
|
|
53636
|
+
exports.LineBasicMaterial = LineBasicMaterial;
|
|
53637
|
+
exports.LineCurve = LineCurve;
|
|
53638
|
+
exports.LineCurve3 = LineCurve3;
|
|
53639
|
+
exports.LineDashedMaterial = LineDashedMaterial;
|
|
53640
|
+
exports.LineLoop = LineLoop;
|
|
53641
|
+
exports.LineSegments = LineSegments;
|
|
53642
|
+
exports.LinearDisplayP3ColorSpace = LinearDisplayP3ColorSpace;
|
|
53643
|
+
exports.LinearEncoding = LinearEncoding;
|
|
53644
|
+
exports.LinearFilter = LinearFilter;
|
|
53645
|
+
exports.LinearInterpolant = LinearInterpolant;
|
|
53646
|
+
exports.LinearMipMapLinearFilter = LinearMipMapLinearFilter;
|
|
53647
|
+
exports.LinearMipMapNearestFilter = LinearMipMapNearestFilter;
|
|
53648
|
+
exports.LinearMipmapLinearFilter = LinearMipmapLinearFilter;
|
|
53649
|
+
exports.LinearMipmapNearestFilter = LinearMipmapNearestFilter;
|
|
53650
|
+
exports.LinearSRGBColorSpace = LinearSRGBColorSpace;
|
|
53651
|
+
exports.LinearToneMapping = LinearToneMapping;
|
|
53652
|
+
exports.LinearTransfer = LinearTransfer;
|
|
53653
|
+
exports.Loader = Loader;
|
|
53654
|
+
exports.LoaderUtils = LoaderUtils;
|
|
53655
|
+
exports.LoadingManager = LoadingManager;
|
|
53656
|
+
exports.LoopOnce = LoopOnce;
|
|
53657
|
+
exports.LoopPingPong = LoopPingPong;
|
|
53658
|
+
exports.LoopRepeat = LoopRepeat;
|
|
53659
|
+
exports.LuminanceAlphaFormat = LuminanceAlphaFormat;
|
|
53660
|
+
exports.LuminanceFormat = LuminanceFormat;
|
|
53661
|
+
exports.MOUSE = MOUSE;
|
|
53662
|
+
exports.Material = Material;
|
|
53663
|
+
exports.MaterialLoader = MaterialLoader;
|
|
53664
|
+
exports.MathUtils = MathUtils;
|
|
53665
|
+
exports.Matrix3 = Matrix3;
|
|
53666
|
+
exports.Matrix4 = Matrix4;
|
|
53667
|
+
exports.MaxEquation = MaxEquation;
|
|
53668
|
+
exports.Mesh = Mesh;
|
|
53669
|
+
exports.MeshBasicMaterial = MeshBasicMaterial;
|
|
53670
|
+
exports.MeshDepthMaterial = MeshDepthMaterial;
|
|
53671
|
+
exports.MeshDistanceMaterial = MeshDistanceMaterial;
|
|
53672
|
+
exports.MeshLambertMaterial = MeshLambertMaterial;
|
|
53673
|
+
exports.MeshMatcapMaterial = MeshMatcapMaterial;
|
|
53674
|
+
exports.MeshNormalMaterial = MeshNormalMaterial;
|
|
53675
|
+
exports.MeshPhongMaterial = MeshPhongMaterial;
|
|
53676
|
+
exports.MeshPhysicalMaterial = MeshPhysicalMaterial;
|
|
53677
|
+
exports.MeshStandardMaterial = MeshStandardMaterial;
|
|
53678
|
+
exports.MeshToonMaterial = MeshToonMaterial;
|
|
53679
|
+
exports.MinEquation = MinEquation;
|
|
53680
|
+
exports.MirroredRepeatWrapping = MirroredRepeatWrapping;
|
|
53681
|
+
exports.MixOperation = MixOperation;
|
|
53682
|
+
exports.MultiplyBlending = MultiplyBlending;
|
|
53683
|
+
exports.MultiplyOperation = MultiplyOperation;
|
|
53684
|
+
exports.NearestFilter = NearestFilter;
|
|
53685
|
+
exports.NearestMipMapLinearFilter = NearestMipMapLinearFilter;
|
|
53686
|
+
exports.NearestMipMapNearestFilter = NearestMipMapNearestFilter;
|
|
53687
|
+
exports.NearestMipmapLinearFilter = NearestMipmapLinearFilter;
|
|
53688
|
+
exports.NearestMipmapNearestFilter = NearestMipmapNearestFilter;
|
|
53689
|
+
exports.NeutralToneMapping = NeutralToneMapping;
|
|
53690
|
+
exports.NeverCompare = NeverCompare;
|
|
53691
|
+
exports.NeverDepth = NeverDepth;
|
|
53692
|
+
exports.NeverStencilFunc = NeverStencilFunc;
|
|
53693
|
+
exports.NoBlending = NoBlending;
|
|
53694
|
+
exports.NoColorSpace = NoColorSpace;
|
|
53695
|
+
exports.NoToneMapping = NoToneMapping;
|
|
53696
|
+
exports.NormalAnimationBlendMode = NormalAnimationBlendMode;
|
|
53697
|
+
exports.NormalBlending = NormalBlending;
|
|
53698
|
+
exports.NotEqualCompare = NotEqualCompare;
|
|
53699
|
+
exports.NotEqualDepth = NotEqualDepth;
|
|
53700
|
+
exports.NotEqualStencilFunc = NotEqualStencilFunc;
|
|
53701
|
+
exports.NumberKeyframeTrack = NumberKeyframeTrack;
|
|
53702
|
+
exports.Object3D = Object3D;
|
|
53703
|
+
exports.ObjectLoader = ObjectLoader;
|
|
53704
|
+
exports.ObjectSpaceNormalMap = ObjectSpaceNormalMap;
|
|
53705
|
+
exports.OctahedronGeometry = OctahedronGeometry;
|
|
53706
|
+
exports.OneFactor = OneFactor;
|
|
53707
|
+
exports.OneMinusConstantAlphaFactor = OneMinusConstantAlphaFactor;
|
|
53708
|
+
exports.OneMinusConstantColorFactor = OneMinusConstantColorFactor;
|
|
53709
|
+
exports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor;
|
|
53710
|
+
exports.OneMinusDstColorFactor = OneMinusDstColorFactor;
|
|
53711
|
+
exports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor;
|
|
53712
|
+
exports.OneMinusSrcColorFactor = OneMinusSrcColorFactor;
|
|
53713
|
+
exports.OrthographicCamera = OrthographicCamera;
|
|
53714
|
+
exports.P3Primaries = P3Primaries;
|
|
53715
|
+
exports.PCFShadowMap = PCFShadowMap;
|
|
53716
|
+
exports.PCFSoftShadowMap = PCFSoftShadowMap;
|
|
53717
|
+
exports.PMREMGenerator = PMREMGenerator;
|
|
53718
|
+
exports.Path = Path;
|
|
53719
|
+
exports.PerspectiveCamera = PerspectiveCamera;
|
|
53720
|
+
exports.Plane = Plane;
|
|
53721
|
+
exports.PlaneGeometry = PlaneGeometry;
|
|
53722
|
+
exports.PlaneHelper = PlaneHelper;
|
|
53723
|
+
exports.PointLight = PointLight;
|
|
53724
|
+
exports.PointLightHelper = PointLightHelper;
|
|
53725
|
+
exports.Points = Points;
|
|
53726
|
+
exports.PointsMaterial = PointsMaterial;
|
|
53727
|
+
exports.PolarGridHelper = PolarGridHelper;
|
|
53728
|
+
exports.PolyhedronGeometry = PolyhedronGeometry;
|
|
53729
|
+
exports.PositionalAudio = PositionalAudio;
|
|
53730
|
+
exports.PropertyBinding = PropertyBinding;
|
|
53731
|
+
exports.PropertyMixer = PropertyMixer;
|
|
53732
|
+
exports.QuadraticBezierCurve = QuadraticBezierCurve;
|
|
53733
|
+
exports.QuadraticBezierCurve3 = QuadraticBezierCurve3;
|
|
53734
|
+
exports.Quaternion = Quaternion;
|
|
53735
|
+
exports.QuaternionKeyframeTrack = QuaternionKeyframeTrack;
|
|
53736
|
+
exports.QuaternionLinearInterpolant = QuaternionLinearInterpolant;
|
|
53737
|
+
exports.RED_GREEN_RGTC2_Format = RED_GREEN_RGTC2_Format;
|
|
53738
|
+
exports.RED_RGTC1_Format = RED_RGTC1_Format;
|
|
53739
|
+
exports.REVISION = REVISION;
|
|
53740
|
+
exports.RGBADepthPacking = RGBADepthPacking;
|
|
53741
|
+
exports.RGBAFormat = RGBAFormat;
|
|
53742
|
+
exports.RGBAIntegerFormat = RGBAIntegerFormat;
|
|
53743
|
+
exports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format;
|
|
53744
|
+
exports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format;
|
|
53745
|
+
exports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format;
|
|
53746
|
+
exports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format;
|
|
53747
|
+
exports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format;
|
|
53748
|
+
exports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format;
|
|
53749
|
+
exports.RGBA_ASTC_4x4_Format = RGBA_ASTC_4x4_Format;
|
|
53750
|
+
exports.RGBA_ASTC_5x4_Format = RGBA_ASTC_5x4_Format;
|
|
53751
|
+
exports.RGBA_ASTC_5x5_Format = RGBA_ASTC_5x5_Format;
|
|
53752
|
+
exports.RGBA_ASTC_6x5_Format = RGBA_ASTC_6x5_Format;
|
|
53753
|
+
exports.RGBA_ASTC_6x6_Format = RGBA_ASTC_6x6_Format;
|
|
53754
|
+
exports.RGBA_ASTC_8x5_Format = RGBA_ASTC_8x5_Format;
|
|
53755
|
+
exports.RGBA_ASTC_8x6_Format = RGBA_ASTC_8x6_Format;
|
|
53756
|
+
exports.RGBA_ASTC_8x8_Format = RGBA_ASTC_8x8_Format;
|
|
53757
|
+
exports.RGBA_BPTC_Format = RGBA_BPTC_Format;
|
|
53758
|
+
exports.RGBA_ETC2_EAC_Format = RGBA_ETC2_EAC_Format;
|
|
53759
|
+
exports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format;
|
|
53760
|
+
exports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format;
|
|
53761
|
+
exports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format;
|
|
53762
|
+
exports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format;
|
|
53763
|
+
exports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format;
|
|
53764
|
+
exports.RGB_BPTC_SIGNED_Format = RGB_BPTC_SIGNED_Format;
|
|
53765
|
+
exports.RGB_BPTC_UNSIGNED_Format = RGB_BPTC_UNSIGNED_Format;
|
|
53766
|
+
exports.RGB_ETC1_Format = RGB_ETC1_Format;
|
|
53767
|
+
exports.RGB_ETC2_Format = RGB_ETC2_Format;
|
|
53768
|
+
exports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format;
|
|
53769
|
+
exports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format;
|
|
53770
|
+
exports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format;
|
|
53771
|
+
exports.RGFormat = RGFormat;
|
|
53772
|
+
exports.RGIntegerFormat = RGIntegerFormat;
|
|
53773
|
+
exports.RawShaderMaterial = RawShaderMaterial;
|
|
53774
|
+
exports.Ray = Ray;
|
|
53775
|
+
exports.Raycaster = Raycaster;
|
|
53776
|
+
exports.Rec709Primaries = Rec709Primaries;
|
|
53777
|
+
exports.RectAreaLight = RectAreaLight;
|
|
53778
|
+
exports.RedFormat = RedFormat;
|
|
53779
|
+
exports.RedIntegerFormat = RedIntegerFormat;
|
|
53780
|
+
exports.ReinhardToneMapping = ReinhardToneMapping;
|
|
53781
|
+
exports.RenderTarget = RenderTarget;
|
|
53782
|
+
exports.RepeatWrapping = RepeatWrapping;
|
|
53783
|
+
exports.ReplaceStencilOp = ReplaceStencilOp;
|
|
53784
|
+
exports.ReverseSubtractEquation = ReverseSubtractEquation;
|
|
53785
|
+
exports.RingGeometry = RingGeometry;
|
|
53786
|
+
exports.SIGNED_RED_GREEN_RGTC2_Format = SIGNED_RED_GREEN_RGTC2_Format;
|
|
53787
|
+
exports.SIGNED_RED_RGTC1_Format = SIGNED_RED_RGTC1_Format;
|
|
53788
|
+
exports.SRGBColorSpace = SRGBColorSpace;
|
|
53789
|
+
exports.SRGBTransfer = SRGBTransfer;
|
|
53790
|
+
exports.Scene = Scene;
|
|
53791
|
+
exports.ShaderChunk = ShaderChunk;
|
|
53792
|
+
exports.ShaderLib = ShaderLib;
|
|
53793
|
+
exports.ShaderMaterial = ShaderMaterial;
|
|
53794
|
+
exports.ShadowMaterial = ShadowMaterial;
|
|
53795
|
+
exports.Shape = Shape;
|
|
53796
|
+
exports.ShapeGeometry = ShapeGeometry;
|
|
53797
|
+
exports.ShapePath = ShapePath;
|
|
53798
|
+
exports.ShapeUtils = ShapeUtils;
|
|
53799
|
+
exports.ShortType = ShortType;
|
|
53800
|
+
exports.Skeleton = Skeleton;
|
|
53801
|
+
exports.SkeletonHelper = SkeletonHelper;
|
|
53802
|
+
exports.SkinnedMesh = SkinnedMesh;
|
|
53803
|
+
exports.Source = Source;
|
|
53804
|
+
exports.Sphere = Sphere;
|
|
53805
|
+
exports.SphereGeometry = SphereGeometry;
|
|
53806
|
+
exports.Spherical = Spherical;
|
|
53807
|
+
exports.SphericalHarmonics3 = SphericalHarmonics3;
|
|
53808
|
+
exports.SplineCurve = SplineCurve;
|
|
53809
|
+
exports.SpotLight = SpotLight;
|
|
53810
|
+
exports.SpotLightHelper = SpotLightHelper;
|
|
53811
|
+
exports.Sprite = Sprite;
|
|
53812
|
+
exports.SpriteMaterial = SpriteMaterial;
|
|
53813
|
+
exports.SrcAlphaFactor = SrcAlphaFactor;
|
|
53814
|
+
exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor;
|
|
53815
|
+
exports.SrcColorFactor = SrcColorFactor;
|
|
53816
|
+
exports.StaticCopyUsage = StaticCopyUsage;
|
|
53817
|
+
exports.StaticDrawUsage = StaticDrawUsage;
|
|
53818
|
+
exports.StaticReadUsage = StaticReadUsage;
|
|
53819
|
+
exports.StereoCamera = StereoCamera;
|
|
53820
|
+
exports.StreamCopyUsage = StreamCopyUsage;
|
|
53821
|
+
exports.StreamDrawUsage = StreamDrawUsage;
|
|
53822
|
+
exports.StreamReadUsage = StreamReadUsage;
|
|
53823
|
+
exports.StringKeyframeTrack = StringKeyframeTrack;
|
|
53824
|
+
exports.SubtractEquation = SubtractEquation;
|
|
53825
|
+
exports.SubtractiveBlending = SubtractiveBlending;
|
|
53826
|
+
exports.TOUCH = TOUCH;
|
|
53827
|
+
exports.TangentSpaceNormalMap = TangentSpaceNormalMap;
|
|
53828
|
+
exports.TetrahedronGeometry = TetrahedronGeometry;
|
|
53829
|
+
exports.Texture = Texture;
|
|
53830
|
+
exports.TextureLoader = TextureLoader;
|
|
53831
|
+
exports.TorusGeometry = TorusGeometry;
|
|
53832
|
+
exports.TorusKnotGeometry = TorusKnotGeometry;
|
|
53833
|
+
exports.Triangle = Triangle;
|
|
53834
|
+
exports.TriangleFanDrawMode = TriangleFanDrawMode;
|
|
53835
|
+
exports.TriangleStripDrawMode = TriangleStripDrawMode;
|
|
53836
|
+
exports.TrianglesDrawMode = TrianglesDrawMode;
|
|
53837
|
+
exports.TubeGeometry = TubeGeometry;
|
|
53838
|
+
exports.UVMapping = UVMapping;
|
|
53839
|
+
exports.Uint16BufferAttribute = Uint16BufferAttribute;
|
|
53840
|
+
exports.Uint32BufferAttribute = Uint32BufferAttribute;
|
|
53841
|
+
exports.Uint8BufferAttribute = Uint8BufferAttribute;
|
|
53842
|
+
exports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute;
|
|
53843
|
+
exports.Uniform = Uniform;
|
|
53844
|
+
exports.UniformsGroup = UniformsGroup;
|
|
53845
|
+
exports.UniformsLib = UniformsLib;
|
|
53846
|
+
exports.UniformsUtils = UniformsUtils;
|
|
53847
|
+
exports.UnsignedByteType = UnsignedByteType;
|
|
53848
|
+
exports.UnsignedInt248Type = UnsignedInt248Type;
|
|
53849
|
+
exports.UnsignedIntType = UnsignedIntType;
|
|
53850
|
+
exports.UnsignedShort4444Type = UnsignedShort4444Type;
|
|
53851
|
+
exports.UnsignedShort5551Type = UnsignedShort5551Type;
|
|
53852
|
+
exports.UnsignedShortType = UnsignedShortType;
|
|
53853
|
+
exports.VSMShadowMap = VSMShadowMap;
|
|
53854
|
+
exports.Vector2 = Vector2;
|
|
53855
|
+
exports.Vector3 = Vector3;
|
|
53856
|
+
exports.Vector4 = Vector4;
|
|
53857
|
+
exports.VectorKeyframeTrack = VectorKeyframeTrack;
|
|
53858
|
+
exports.VideoTexture = VideoTexture;
|
|
53859
|
+
exports.WebGL1Renderer = WebGL1Renderer;
|
|
53860
|
+
exports.WebGL3DRenderTarget = WebGL3DRenderTarget;
|
|
53861
|
+
exports.WebGLArrayRenderTarget = WebGLArrayRenderTarget;
|
|
53862
|
+
exports.WebGLCoordinateSystem = WebGLCoordinateSystem;
|
|
53863
|
+
exports.WebGLCubeRenderTarget = WebGLCubeRenderTarget;
|
|
53864
|
+
exports.WebGLMultipleRenderTargets = WebGLMultipleRenderTargets;
|
|
53865
|
+
exports.WebGLRenderTarget = WebGLRenderTarget;
|
|
53866
|
+
exports.WebGLRenderer = WebGLRenderer;
|
|
53867
|
+
exports.WebGLUtils = WebGLUtils;
|
|
53868
|
+
exports.WebGPUCoordinateSystem = WebGPUCoordinateSystem;
|
|
53869
|
+
exports.WireframeGeometry = WireframeGeometry;
|
|
53870
|
+
exports.WrapAroundEnding = WrapAroundEnding;
|
|
53871
|
+
exports.ZeroCurvatureEnding = ZeroCurvatureEnding;
|
|
53872
|
+
exports.ZeroFactor = ZeroFactor;
|
|
53873
|
+
exports.ZeroSlopeEnding = ZeroSlopeEnding;
|
|
53874
|
+
exports.ZeroStencilOp = ZeroStencilOp;
|
|
53875
|
+
exports._SRGBAFormat = _SRGBAFormat;
|
|
53876
|
+
exports.createCanvasElement = createCanvasElement;
|
|
53877
|
+
exports.sRGBEncoding = sRGBEncoding;
|