JustPaste.it

QWbaLVa?editors=1010:1000 Unrecognized feature: 'ambient-light-sensor'.
QWbaLVa?editors=1010:1000 Unrecognized feature: 'vr'.
three.module.js:18314 THREE.WebGLProgram: gl.getProgramInfoLog() C:\fakepath(93,23-137): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(85,18-57): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(97,25-83): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(89,18-65): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them

WebGLProgram @ three.module.js:18314
three.module.js:18314 THREE.WebGLProgram: gl.getProgramInfoLog() C:\fakepath(82,23-137): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(74,18-57): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(86,25-83): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(78,18-65): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them

 

WebGLProgram @ three.module.js:18314
three.module.js:18310 THREE.WebGLProgram: shader error: 0 35715 false gl.getProgramInfoLog

 

1: precision highp float;
2: precision highp int;
3: #define HIGH_PRECISION
4: #define SHADER_NAME MeshStandardMaterial
5: #define STANDARD
6: #define VERTEX_TEXTURES
7: #define GAMMA_FACTOR 2
8: #define MAX_BONES 0
9: #define USE_ENVMAP
10: #define ENVMAP_MODE_REFLECTION
11: #define BONE_TEXTURE
12: uniform mat4 modelMatrix;
13: uniform mat4 modelViewMatrix;
14: uniform mat4 projectionMatrix;
15: uniform mat4 viewMatrix;
16: uniform mat3 normalMatrix;
17: uniform vec3 cameraPosition;
18: uniform bool isOrthographic;
19: #ifdef USE_INSTANCING
20: attribute mat4 instanceMatrix;
21: #endif
22: attribute vec3 position;
23: attribute vec3 normal;
24: attribute vec2 uv;
25: #ifdef USE_TANGENT
26: attribute vec4 tangent;
27: #endif
28: #ifdef USE_COLOR
29: attribute vec3 color;
30: #endif
31: #ifdef USE_MORPHTARGETS
32: attribute vec3 morphTarget0;
33: attribute vec3 morphTarget1;
34: attribute vec3 morphTarget2;
35: attribute vec3 morphTarget3;
36: #ifdef USE_MORPHNORMALS
37: attribute vec3 morphNormal0;
38: attribute vec3 morphNormal1;
39: attribute vec3 morphNormal2;
40: attribute vec3 morphNormal3;
41: #else
42: attribute vec3 morphTarget4;
43: attribute vec3 morphTarget5;
44: attribute vec3 morphTarget6;
45: attribute vec3 morphTarget7;
46: #endif
47: #endif
48: #ifdef USE_SKINNING
49: attribute vec4 skinIndex;
50: attribute vec4 skinWeight;
51: #endif
52:
53: #define STANDARD
54: varying vec3 vViewPosition;
55: #ifndef FLAT_SHADED
56: varying vec3 vNormal;
57: #ifdef USE_TANGENT
58: varying vec3 vTangent;
59: varying vec3 vBitangent;
60: #endif
61: #endif
62: #define PI 3.14159265359
63: #define PI2 6.28318530718
64: #define PI_HALF 1.5707963267949
65: #define RECIPROCAL_PI 0.31830988618
66: #define RECIPROCAL_PI2 0.15915494
67: #define LOG2 1.442695
68: #define EPSILON 1e-6
69: #ifndef saturate
70: #define saturate(a) clamp( a, 0.0, 1.0 )
71: #endif
72: #define whiteComplement(a) ( 1.0 - saturate( a ) )
73: float pow2( const in float x ) { return x*x; }
74: float pow3( const in float x ) { return x*x*x; }
75: float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
76: float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
77: highp float rand( const in vec2 uv ) {
78: const highp float a = 12.9898, b = 78.233, c = 43758.5453;
79: highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
80: return fract(sin(sn) * c);
81: }
82: #ifdef HIGH_PRECISION
83: float precisionSafeLength( vec3 v ) { return length( v ); }
84: #else
85: float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }
86: float precisionSafeLength( vec3 v ) {
87: float maxComponent = max3( abs( v ) );
88: return length( v / maxComponent ) * maxComponent;
89: }
90: #endif
91: struct IncidentLight {
92: vec3 color;
93: vec3 direction;
94: bool visible;
95: };
96: struct ReflectedLight {
97: vec3 directDiffuse;
98: vec3 directSpecular;
99: vec3 indirectDiffuse;
100: vec3 indirectSpecular;
101: };
102: struct GeometricContext {
103: vec3 position;
104: vec3 normal;
105: vec3 viewDir;
106: #ifdef CLEARCOAT
107: vec3 clearcoatNormal;
108: #endif
109: };
110: vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
111: return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
112: }
113: vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
114: return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
115: }
116: vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
117: float distance = dot( planeNormal, point - pointOnPlane );
118: return - distance * planeNormal + point;
119: }
120: float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
121: return sign( dot( point - pointOnPlane, planeNormal ) );
122: }
123: vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {
124: return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;
125: }
126: mat3 transposeMat3( const in mat3 m ) {
127: mat3 tmp;
128: tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
129: tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
130: tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
131: return tmp;
132: }
133: float linearToRelativeLuminance( const in vec3 color ) {
134: vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
135: return dot( weights, color.rgb );
136: }
137: bool isPerspectiveMatrix( mat4 m ) {
138: return m[ 2 ][ 3 ] == - 1.0;
139: }
140: #ifdef USE_UV
141: #ifdef UVS_VERTEX_ONLY
142: vec2 vUv;
143: #else
144: varying vec2 vUv;
145: #endif
146: uniform mat3 uvTransform;
147: #endif
148: #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
149: attribute vec2 uv2;
150: varying vec2 vUv2;
151: uniform mat3 uv2Transform;
152: #endif
153: #ifdef USE_DISPLACEMENTMAP
154: uniform sampler2D displacementMap;
155: uniform fl THREE.WebGLShader: gl.getShaderInfoLog() fragment
1: #extension GL_OES_standard_derivatives : enable
2: #extension GL_EXT_shader_texture_lod : enable
3: precision highp float;
4: precision highp int;
5: #define HIGH_PRECISION
6: #define SHADER_NAME MeshStandardMaterial
7: #define STANDARD
8: #define GAMMA_FACTOR 2
9: #define USE_ENVMAP
10: #define ENVMAP_TYPE_CUBE_UV
11: #define ENVMAP_MODE_REFLECTION
12: #define ENVMAP_BLENDING_NONE
13: #define TEXTURE_LOD_EXT
14: uniform mat4 viewMatrix;
15: uniform vec3 cameraPosition;
16: uniform bool isOrthographic;
17: #define TONE_MAPPING
18: #ifndef saturate
19: #define saturate(a) clamp( a, 0.0, 1.0 )
20: #endif
21: uniform float toneMappingExposure;
22: uniform float toneMappingWhitePoint;
23: vec3 LinearToneMapping( vec3 color ) {
24: return toneMappingExposure * color;
25: }
26: vec3 ReinhardToneMapping( vec3 color ) {
27: color *= toneMappingExposure;
28: return saturate( color / ( vec3( 1.0 ) + color ) );
29: }
30: #define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )
31: vec3 Uncharted2ToneMapping( vec3 color ) {
32: color *= toneMappingExposure;
33: return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );
34: }
35: vec3 OptimizedCineonToneMapping( vec3 color ) {
36: color *= toneMappingExposure;
37: color = max( vec3( 0.0 ), color - 0.004 );
38: return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
39: }
40: vec3 ACESFilmicToneMapping( vec3 color ) {
41: color *= toneMappingExposure;
42: return saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );
43: }
44: vec3 toneMapping( vec3 color ) { return LinearToneMapping( color ); }
45:
46: vec4 LinearToLinear( in vec4 value ) {
47: return value;
48: }
49: vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {
50: return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );
51: }
52: vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {
53: return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );
54: }
55: vec4 sRGBToLinear( in vec4 value ) {
56: return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
57: }
58: vec4 LinearTosRGB( in vec4 value ) {
59: return 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 );
60: }
61: vec4 RGBEToLinear( in vec4 value ) {
62: return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
63: }
64: vec4 LinearToRGBE( in vec4 value ) {
65: float maxComponent = max( max( value.r, value.g ), value.b );
66: float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
67: return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
68: }
69: vec4 RGBMToLinear( in vec4 value, in float maxRange ) {
70: return vec4( value.rgb * value.a * maxRange, 1.0 );
71: }
72: vec4 LinearToRGBM( in vec4 value, in float maxRange ) {
73: float maxRGB = max( value.r, max( value.g, value.b ) );
74: float M = clamp( maxRGB / maxRange, 0.0, 1.0 );
75: M = ceil( M * 255.0 ) / 255.0;
76: return vec4( value.rgb / ( M * maxRange ), M );
77: }
78: vec4 RGBDToLinear( in vec4 value, in float maxRange ) {
79: return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );
80: }
81: vec4 LinearToRGBD( in vec4 value, in float maxRange ) {
82: float maxRGB = max( value.r, max( value.g, value.b ) );
83: float D = max( maxRange / maxRGB, 1.0 );
84: D = clamp( floor( D ) / 255.0, 0.0, 1.0 );
85: return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );
86: }
87: const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );
88: vec4 LinearToLogLuv( in vec4 value ) {
89: vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;
90: Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );
91: vec4 vResult;
92: vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;
93: float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;
94: vResult.w = fract( Le );
95: vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;
96: return vResult;
97: }
98: const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );
99: vec4 LogLuvToLinear( in vec4 value ) {
100: float Le = value.z * 255.0 + value.w;
101: vec3 Xp_Y_XYZp;
102: Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );
103: Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;
104: Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;
105: vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;
106: return vec4( max( vRGB, 0.0 ), 1.0 );
107: }
108: vec4 mapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }
109: vec4 matcapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }
110: vec4 envMapTexelToLinear( v
WebGLProgram @ three.module.js:18310
three.module.js:20737 WebGL: INVALID_OPERATION: useProgram: program not valid
useProgram @ three.module.js:20737
three.module.js:18310 THREE.WebGLProgram: shader error: 1282 35715 false gl.getProgramInfoLog THREE.WebGLShader: gl.getShaderInfoLog() vertex
1: precision highp float;
2: precision highp int;
3: #define HIGH_PRECISION
4: #define SHADER_NAME LineBasicMaterial
5: #define VERTEX_TEXTURES
6: #define GAMMA_FACTOR 2
7: #define MAX_BONES 0
8: #define USE_COLOR
9: #define BONE_TEXTURE
10: uniform mat4 modelMatrix;
11: uniform mat4 modelViewMatrix;
12: uniform mat4 projectionMatrix;
13: uniform mat4 viewMatrix;
14: uniform mat3 normalMatrix;
15: uniform vec3 cameraPosition;
16: uniform bool isOrthographic;
17: #ifdef USE_INSTANCING
18: attribute mat4 instanceMatrix;
19: #endif
20: attribute vec3 position;
21: attribute vec3 normal;
22: attribute vec2 uv;
23: #ifdef USE_TANGENT
24: attribute vec4 tangent;
25: #endif
26: #ifdef USE_COLOR
27: attribute vec3 color;
28: #endif
29: #ifdef USE_MORPHTARGETS
30: attribute vec3 morphTarget0;
31: attribute vec3 morphTarget1;
32: attribute vec3 morphTarget2;
33: attribute vec3 morphTarget3;
34: #ifdef USE_MORPHNORMALS
35: attribute vec3 morphNormal0;
36: attribute vec3 morphNormal1;
37: attribute vec3 morphNormal2;
38: attribute vec3 morphNormal3;
39: #else
40: attribute vec3 morphTarget4;
41: attribute vec3 morphTarget5;
42: attribute vec3 morphTarget6;
43: attribute vec3 morphTarget7;
44: #endif
45: #endif
46: #ifdef USE_SKINNING
47: attribute vec4 skinIndex;
48: attribute vec4 skinWeight;
49: #endif
50:
51: #define PI 3.14159265359
52: #define PI2 6.28318530718
53: #define PI_HALF 1.5707963267949
54: #define RECIPROCAL_PI 0.31830988618
55: #define RECIPROCAL_PI2 0.15915494
56: #define LOG2 1.442695
57: #define EPSILON 1e-6
58: #ifndef saturate
59: #define saturate(a) clamp( a, 0.0, 1.0 )
60: #endif
61: #define whiteComplement(a) ( 1.0 - saturate( a ) )
62: float pow2( const in float x ) { return x*x; }
63: float pow3( const in float x ) { return x*x*x; }
64: float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
65: float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
66: highp float rand( const in vec2 uv ) {
67: const highp float a = 12.9898, b = 78.233, c = 43758.5453;
68: highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
69: return fract(sin(sn) * c);
70: }
71: #ifdef HIGH_PRECISION
72: float precisionSafeLength( vec3 v ) { return length( v ); }
73: #else
74: float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }
75: float precisionSafeLength( vec3 v ) {
76: float maxComponent = max3( abs( v ) );
77: return length( v / maxComponent ) * maxComponent;
78: }
79: #endif
80: struct IncidentLight {
81: vec3 color;
82: vec3 direction;
83: bool visible;
84: };
85: struct ReflectedLight {
86: vec3 directDiffuse;
87: vec3 directSpecular;
88: vec3 indirectDiffuse;
89: vec3 indirectSpecular;
90: };
91: struct GeometricContext {
92: vec3 position;
93: vec3 normal;
94: vec3 viewDir;
95: #ifdef CLEARCOAT
96: vec3 clearcoatNormal;
97: #endif
98: };
99: vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
100: return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
101: }
102: vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
103: return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
104: }
105: vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
106: float distance = dot( planeNormal, point - pointOnPlane );
107: return - distance * planeNormal + point;
108: }
109: float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
110: return sign( dot( point - pointOnPlane, planeNormal ) );
111: }
112: vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {
113: return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;
114: }
115: mat3 transposeMat3( const in mat3 m ) {
116: mat3 tmp;
117: tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
118: tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
119: tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
120: return tmp;
121: }
122: float linearToRelativeLuminance( const in vec3 color ) {
123: vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
124: return dot( weights, color.rgb );
125: }
126: bool isPerspectiveMatrix( mat4 m ) {
127: return m[ 2 ][ 3 ] == - 1.0;
128: }
129: #ifdef USE_UV
130: #ifdef UVS_VERTEX_ONLY
131: vec2 vUv;
132: #else
133: varying vec2 vUv;
134: #endif
135: uniform mat3 uvTransform;
136: #endif
137: #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
138: attribute vec2 uv2;
139: varying vec2 vUv2;
140: uniform mat3 uv2Transform;
141: #endif
142: #ifdef USE_ENVMAP
143: #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )
144: #define ENV_WORLDPOS
145: #endif
146: #ifdef ENV_WORLDPOS
147:
148: varying vec3 vWorldPosition;
149: #else
150: varying vec3 vReflect;
151: uniform float refractionRatio;
152: #endif
153: #endif
154: #ifdef USE_COLOR
155: varying vec3 vColor;
156: THREE.WebGLShader: gl.getShaderInfoLog() fragment
1: precision highp float;
2: precision highp int;
3: #define HIGH_PRECISION
4: #define SHADER_NAME LineBasicMaterial
5: #define GAMMA_FACTOR 2
6: #define USE_COLOR
7: uniform mat4 viewMatrix;
8: uniform vec3 cameraPosition;
9: uniform bool isOrthographic;
10: #define TONE_MAPPING
11: #ifndef saturate
12: #define saturate(a) clamp( a, 0.0, 1.0 )
13: #endif
14: uniform float toneMappingExposure;
15: uniform float toneMappingWhitePoint;
16: vec3 LinearToneMapping( vec3 color ) {
17: return toneMappingExposure * color;
18: }
19: vec3 ReinhardToneMapping( vec3 color ) {
20: color *= toneMappingExposure;
21: return saturate( color / ( vec3( 1.0 ) + color ) );
22: }
23: #define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )
24: vec3 Uncharted2ToneMapping( vec3 color ) {
25: color *= toneMappingExposure;
26: return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );
27: }
28: vec3 OptimizedCineonToneMapping( vec3 color ) {
29: color *= toneMappingExposure;
30: color = max( vec3( 0.0 ), color - 0.004 );
31: return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
32: }
33: vec3 ACESFilmicToneMapping( vec3 color ) {
34: color *= toneMappingExposure;
35: return saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );
36: }
37: vec3 toneMapping( vec3 color ) { return LinearToneMapping( color ); }
38:
39: vec4 LinearToLinear( in vec4 value ) {
40: return value;
41: }
42: vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {
43: return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );
44: }
45: vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {
46: return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );
47: }
48: vec4 sRGBToLinear( in vec4 value ) {
49: return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
50: }
51: vec4 LinearTosRGB( in vec4 value ) {
52: return 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 );
53: }
54: vec4 RGBEToLinear( in vec4 value ) {
55: return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
56: }
57: vec4 LinearToRGBE( in vec4 value ) {
58: float maxComponent = max( max( value.r, value.g ), value.b );
59: float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
60: return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
61: }
62: vec4 RGBMToLinear( in vec4 value, in float maxRange ) {
63: return vec4( value.rgb * value.a * maxRange, 1.0 );
64: }
65: vec4 LinearToRGBM( in vec4 value, in float maxRange ) {
66: float maxRGB = max( value.r, max( value.g, value.b ) );
67: float M = clamp( maxRGB / maxRange, 0.0, 1.0 );
68: M = ceil( M * 255.0 ) / 255.0;
69: return vec4( value.rgb / ( M * maxRange ), M );
70: }
71: vec4 RGBDToLinear( in vec4 value, in float maxRange ) {
72: return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );
73: }
74: vec4 LinearToRGBD( in vec4 value, in float maxRange ) {
75: float maxRGB = max( value.r, max( value.g, value.b ) );
76: float D = max( maxRange / maxRGB, 1.0 );
77: D = clamp( floor( D ) / 255.0, 0.0, 1.0 );
78: return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );
79: }
80: const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );
81: vec4 LinearToLogLuv( in vec4 value ) {
82: vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;
83: Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );
84: vec4 vResult;
85: vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;
86: float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;
87: vResult.w = fract( Le );
88: vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;
89: return vResult;
90: }
91: const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );
92: vec4 LogLuvToLinear( in vec4 value ) {
93: float Le = value.z * 255.0 + value.w;
94: vec3 Xp_Y_XYZp;
95: Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );
96: Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;
97: Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;
98: vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;
99: return vec4( max( vRGB, 0.0 ), 1.0 );
100: }
101: vec4 mapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }
102: vec4 matcapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }
103: vec4 envMapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }
104: vec4 emissiveMapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }
105: vec4 lightMapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }
106: vec4 linearToOutputTexel( vec4 value ) { re
WebGLProgram @ three.module.js:18310
three.module.js:20737 WebGL: INVALID_OPERATION: useProgram: program not valid
useProgram @ three.module.js:20737
QWbaLVa?editors=1010:1 WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
three.module.js:23798 THREE.WebGLRenderer: Context Lost.