x_ite 16.0.2 → 16.0.4
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/README.md +5 -5
- package/dist/assets/components/AnnotationComponent.js +1 -1
- package/dist/assets/components/AnnotationComponent.min.js +1 -1
- package/dist/assets/components/CADGeometryComponent.js +1 -1
- package/dist/assets/components/CADGeometryComponent.min.js +1 -1
- package/dist/assets/components/CubeMapTexturingComponent.js +4 -5
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +1 -1
- package/dist/assets/components/DISComponent.min.js +1 -1
- package/dist/assets/components/EventUtilitiesComponent.js +1 -1
- package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
- package/dist/assets/components/GaussianSplatsComponent.js +1 -1
- package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
- package/dist/assets/components/Geometry2DComponent.js +1 -1
- package/dist/assets/components/Geometry2DComponent.min.js +1 -1
- package/dist/assets/components/Geometry3DComponent.js +1 -1
- package/dist/assets/components/Geometry3DComponent.min.js +1 -1
- package/dist/assets/components/GeospatialComponent.js +1 -1
- package/dist/assets/components/GeospatialComponent.min.js +1 -1
- package/dist/assets/components/HAnimComponent.js +1 -1
- package/dist/assets/components/HAnimComponent.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
- package/dist/assets/components/LayoutComponent.js +1 -1
- package/dist/assets/components/LayoutComponent.min.js +1 -1
- package/dist/assets/components/NURBSComponent.js +1 -1
- package/dist/assets/components/NURBSComponent.min.js +1 -1
- package/dist/assets/components/ParticleSystemsComponent.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +1 -1
- package/dist/assets/components/PickingComponent.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
- package/dist/assets/components/ScriptingComponent.js +1 -1
- package/dist/assets/components/ScriptingComponent.min.js +1 -1
- package/dist/assets/components/TextComponent.js +1 -1
- package/dist/assets/components/TextComponent.min.js +1 -1
- package/dist/assets/components/TextureProjectionComponent.js +1 -1
- package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
- package/dist/assets/components/Texturing3DComponent.js +9 -10
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +1 -1
- package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
- package/dist/assets/components/WebXRComponent.js +1 -1
- package/dist/assets/components/WebXRComponent.min.js +1 -1
- package/dist/assets/components/X_ITEComponent.js +1 -1
- package/dist/assets/components/X_ITEComponent.min.js +1 -1
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +79 -93
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +79 -93
- package/dist/x_ite.zip +0 -0
- package/package.json +3 -3
package/dist/x_ite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v16.0.
|
|
1
|
+
/* X_ITE v16.0.4 */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
4
|
module.exports = factory();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
return /******/ (() => { // webpackBootstrap
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/
|
|
15
|
+
/***/ 72
|
|
16
16
|
(module, exports) {
|
|
17
17
|
|
|
18
18
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -1017,7 +1017,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1017
1017
|
|
|
1018
1018
|
/***/ },
|
|
1019
1019
|
|
|
1020
|
-
/***/
|
|
1020
|
+
/***/ 402
|
|
1021
1021
|
(module) {
|
|
1022
1022
|
|
|
1023
1023
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -2013,7 +2013,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
2013
2013
|
|
|
2014
2014
|
/***/ },
|
|
2015
2015
|
|
|
2016
|
-
/***/
|
|
2016
|
+
/***/ 258
|
|
2017
2017
|
(module) {
|
|
2018
2018
|
|
|
2019
2019
|
/**
|
|
@@ -18846,7 +18846,7 @@ const Legacy_default_ = Legacy;
|
|
|
18846
18846
|
|
|
18847
18847
|
/* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
|
|
18848
18848
|
;// ./src/x_ite/BROWSER_VERSION.js
|
|
18849
|
-
const BROWSER_VERSION_default_ = "16.0.
|
|
18849
|
+
const BROWSER_VERSION_default_ = "16.0.4";
|
|
18850
18850
|
;
|
|
18851
18851
|
|
|
18852
18852
|
/* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
|
|
@@ -31133,7 +31133,7 @@ const Plane3_default_ = Plane3;
|
|
|
31133
31133
|
|
|
31134
31134
|
/* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
|
|
31135
31135
|
;// ./src/standard/Math/Geometry/Triangle3.js
|
|
31136
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
31136
|
+
/* provided dependency */ var libtess = __webpack_require__(258);
|
|
31137
31137
|
|
|
31138
31138
|
|
|
31139
31139
|
const Triangle3 =
|
|
@@ -47763,7 +47763,7 @@ const Bezier_default_ = Bezier;
|
|
|
47763
47763
|
|
|
47764
47764
|
/* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
|
|
47765
47765
|
;// ./src/x_ite/Parser/SVGParser.js
|
|
47766
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
47766
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(258);
|
|
47767
47767
|
|
|
47768
47768
|
|
|
47769
47769
|
|
|
@@ -54445,7 +54445,7 @@ function X3DCoreContext (element)
|
|
|
54445
54445
|
</div>
|
|
54446
54446
|
</div>`;
|
|
54447
54447
|
|
|
54448
|
-
if (element .
|
|
54448
|
+
if (element .shadowRoot)
|
|
54449
54449
|
{
|
|
54450
54450
|
this [_shadow] = element .shadowRoot;
|
|
54451
54451
|
|
|
@@ -54455,7 +54455,7 @@ function X3DCoreContext (element)
|
|
|
54455
54455
|
{
|
|
54456
54456
|
const link = document .createElement ("link");
|
|
54457
54457
|
|
|
54458
|
-
link .integrity = "sha384-
|
|
54458
|
+
link .integrity = "sha384-r/Gb5cpjKIPkLAwOrsKEHLP6i0CMS4kHdw86CIUHces4jE1JV+E2ip+Bb42dwD2D";
|
|
54459
54459
|
link .rel = "stylesheet";
|
|
54460
54460
|
link .crossOrigin = "anonymous";
|
|
54461
54461
|
link .onload = resolve;
|
|
@@ -59286,47 +59286,6 @@ const X3DLayeringContext_default_ = X3DLayeringContext;
|
|
|
59286
59286
|
;
|
|
59287
59287
|
|
|
59288
59288
|
/* harmony default export */ const Layering_X3DLayeringContext = (x_ite_Namespace .add ("X3DLayeringContext", X3DLayeringContext_default_));
|
|
59289
|
-
;// ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
|
|
59290
|
-
const ToneMapping2_glsl_default_ = () => /* glsl */ `
|
|
59291
|
-
const float GAMMA=2.2;const float INV_GAMMA=1./GAMMA;vec3 linearToSRGB(const in vec3 color){return pow(color,vec3(INV_GAMMA));}vec4 linearToSRGB(const in vec4 color){return vec4(linearToSRGB(color.rgb),color.a);}vec3 sRGBToLinear(const in vec3 color){return pow(color,vec3(GAMMA));}vec4 sRGBToLinear(const in vec4 color){return vec4(sRGBToLinear(color.rgb),color.a);}
|
|
59292
|
-
#if defined(X3D_LINEAR_OUTPUT)
|
|
59293
|
-
vec3 toneMap(in vec3 color){
|
|
59294
|
-
#if defined(X3D_COLORSPACE_SRGB)
|
|
59295
|
-
color=sRGBToLinear(color);
|
|
59296
|
-
#endif
|
|
59297
|
-
return color;}
|
|
59298
|
-
#else
|
|
59299
|
-
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
59300
|
-
vec3 toneMapACES_Narkowicz(const in vec3 color){const float A=2.51;const float B=.03;const float C=2.43;const float D=.59;const float E=.14;return clamp((color*(A*color+B))/(color*(C*color+D)+E),0.,1.);}
|
|
59301
|
-
#endif
|
|
59302
|
-
#if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
59303
|
-
const mat3 ACESInputMat=mat3(.59719,.07600,.02840,.35458,.90834,.13383,.04823,.01566,.83777);const mat3 ACESOutputMat=mat3(1.60475,-.10208,-.00327,-.53108,1.10813,-.07276,-.07367,-.00605,1.07602);vec3 RRTAndODTFit(const in vec3 color){vec3 a=color*(color+.0245786)-.000090537;vec3 b=color*(.983729*color+.4329510)+.238081;return a/b;}vec3 toneMapACES_Hill(in vec3 color){color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=clamp(color,0.,1.);return color;}
|
|
59304
|
-
#endif
|
|
59305
|
-
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
59306
|
-
vec3 toneMap_KhronosPbrNeutral(in vec3 color){const float startCompression=.8-.04;const float desaturation=.15;float x=min(color.r,min(color.g,color.b));float offset=x<.08?x-6.25*x*x:.04;color-=offset;float peak=max(color.r,max(color.g,color.b));if(peak<startCompression)return color;const float d=1.-startCompression;float newPeak=1.-d*d/(peak+d-startCompression);color*=newPeak/peak;float g=1.-1./(desaturation*(peak-newPeak)+1.);return mix(color,newPeak*vec3(1),g);}
|
|
59307
|
-
#endif
|
|
59308
|
-
uniform float x3d_Exposure;vec3 toneMap(in vec3 color){color*=x3d_Exposure;
|
|
59309
|
-
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
59310
|
-
color=toneMapACES_Narkowicz(color);
|
|
59311
|
-
#endif
|
|
59312
|
-
#if defined(X3D_TONEMAP_ACES_HILL)
|
|
59313
|
-
color=toneMapACES_Hill(color);
|
|
59314
|
-
#endif
|
|
59315
|
-
#if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
59316
|
-
color/=.6;color=toneMapACES_Hill(color);
|
|
59317
|
-
#endif
|
|
59318
|
-
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
59319
|
-
color=toneMap_KhronosPbrNeutral(color);
|
|
59320
|
-
#endif
|
|
59321
|
-
#if defined(X3D_COLORSPACE_LINEAR)
|
|
59322
|
-
color=linearToSRGB(color);
|
|
59323
|
-
#endif
|
|
59324
|
-
return color;}
|
|
59325
|
-
#endif
|
|
59326
|
-
`
|
|
59327
|
-
;
|
|
59328
|
-
|
|
59329
|
-
/* harmony default export */ const ToneMapping2_glsl = (x_ite_Namespace .add ("ToneMapping2.glsl", ToneMapping2_glsl_default_));
|
|
59330
59289
|
;// ./src/x_ite/Browser/Lighting/Distribution.js
|
|
59331
59290
|
let Distribution_i = 0;
|
|
59332
59291
|
|
|
@@ -59344,12 +59303,11 @@ const Distribution_default_ = Distribution;
|
|
|
59344
59303
|
;// ./src/x_ite/Browser/Lighting/Filter2.fs.js
|
|
59345
59304
|
|
|
59346
59305
|
|
|
59347
|
-
|
|
59348
59306
|
const Filter2_fs_default_ = /* glsl */ `#version 300 es
|
|
59349
59307
|
precision highp float;precision highp int;precision highp samplerCube;
|
|
59350
|
-
|
|
59308
|
+
#include<ToneMapping>
|
|
59351
59309
|
${Object .entries (Lighting_Distribution) .map (([name, value]) => `#define X3D_${name} ${value}`) .join ("\n")}
|
|
59352
|
-
const float M_PI=3.
|
|
59310
|
+
const float M_PI=3.141592653589793;uniform samplerCube x3d_TextureEXT;uniform int x3d_TextureSizeEXT;uniform bool x3d_TextureLinearEXT;uniform int x3d_CurrentFaceEXT;uniform int x3d_DistributionEXT;uniform int x3d_SampleCountEXT;uniform float x3d_RoughnessEXT;uniform float x3d_LodBiasEXT;uniform float x3d_IntensityEXT;uniform vec3 x3d_FlipEXT;in vec2 texCoord;out vec4 x3d_FragColor;mat3 generateTBN(const in vec3 normal){vec3 bitangent=vec3(0.,1.,0.);float NdotUp=dot(normal,vec3(0.,1.,0.));float epsilon=.0000001;if(1.-abs(NdotUp)<=epsilon){if(NdotUp>0.)bitangent=vec3(0.,0.,1.);else bitangent=vec3(0.,0.,-1.);}vec3 tangent=normalize(cross(bitangent,normal));bitangent=cross(normal,tangent);return mat3(tangent,bitangent,normal);}struct MicrofacetDistributionSample{float pdf;float cosTheta;float sinTheta;float phi;};float radicalInverse_VdC(in uint bits){bits=(bits<<16u)|(bits>>16u);bits=((bits&0x55555555u)<<1u)|((bits&0xAAAAAAAAu)>>1u);bits=((bits&0x33333333u)<<2u)|((bits&0xCCCCCCCCu)>>2u);bits=((bits&0x0F0F0F0Fu)<<4u)|((bits&0xF0F0F0F0u)>>4u);bits=((bits&0x00FF00FFu)<<8u)|((bits&0xFF00FF00u)>>8u);return float(bits)*2.3283064365386963e-10;}vec2 hammersley2d(const in int i,const in int N){return vec2(float(i)/float(N),radicalInverse_VdC(uint(i)));}MicrofacetDistributionSample Lambertian(const in vec2 xi,const in float roughness){MicrofacetDistributionSample lambertian;lambertian.cosTheta=sqrt(1.-xi.y);lambertian.sinTheta=sqrt(xi.y);lambertian.phi=2.*M_PI*xi.x;lambertian.pdf=lambertian.cosTheta/M_PI;return lambertian;}float saturate(const in float v){return clamp(v,0.,1.);}float D_GGX(const in float NdotH,const in float roughness){float a=NdotH*roughness;float k=roughness/(1.-NdotH*NdotH+a*a);return k*k*(1./M_PI);}MicrofacetDistributionSample GGX(const in vec2 xi,const in float roughness){MicrofacetDistributionSample ggx;float alpha=roughness*roughness;ggx.cosTheta=saturate(sqrt((1.-xi.y)/(1.+(alpha*alpha-1.)*xi.y)));ggx.sinTheta=sqrt(1.-ggx.cosTheta*ggx.cosTheta);ggx.phi=2.*M_PI*xi.x;ggx.pdf=D_GGX(ggx.cosTheta,alpha);ggx.pdf/=4.;return ggx;}float D_Charlie(in float sheenRoughness,const in float NdotH){sheenRoughness=max(sheenRoughness,.000001);float invR=1./sheenRoughness;float cos2h=NdotH*NdotH;float sin2h=1.-cos2h;return(2.+invR)*pow(sin2h,invR*.5)/(2.*M_PI);}MicrofacetDistributionSample Charlie(const in vec2 xi,const in float roughness){MicrofacetDistributionSample charlie;float alpha=roughness*roughness;charlie.sinTheta=pow(xi.y,alpha/(2.*alpha+1.));charlie.cosTheta=sqrt(1.-charlie.sinTheta*charlie.sinTheta);charlie.phi=2.*M_PI*xi.x;charlie.pdf=D_Charlie(alpha,charlie.cosTheta);charlie.pdf/=4.;return charlie;}vec4 getImportanceSample(const in int sampleIndex,const in vec3 N,const in float roughness){vec2 xi=hammersley2d(sampleIndex,x3d_SampleCountEXT);MicrofacetDistributionSample importanceSample;switch(x3d_DistributionEXT){case X3D_LAMBERTIAN:{importanceSample=Lambertian(xi,roughness);break;}case X3D_GGX:{importanceSample=GGX(xi,roughness);break;}case X3D_CHARLIE:{importanceSample=Charlie(xi,roughness);break;}}vec3 localSpaceDirection=normalize(vec3(importanceSample.sinTheta*cos(importanceSample.phi),importanceSample.sinTheta*sin(importanceSample.phi),importanceSample.cosTheta));mat3 TBN=generateTBN(N);vec3 direction=TBN*localSpaceDirection;return vec4(direction,importanceSample.pdf);}float computeLod(const in float pdf){float lod=.5*log2(6.*float(x3d_TextureSizeEXT)*float(x3d_TextureSizeEXT)/(float(x3d_SampleCountEXT)*pdf));return lod;}vec3 filterColor(const in vec3 N){vec3 color=vec3(0);float weight=0.;for(int i=0;i<x3d_SampleCountEXT;++i){vec4 importanceSample=getImportanceSample(i,N,x3d_RoughnessEXT);vec3 H=importanceSample.xyz;float pdf=importanceSample.w;float lod=computeLod(pdf);lod+=x3d_LodBiasEXT;switch(x3d_DistributionEXT){case X3D_LAMBERTIAN:{vec3 lambertian=textureLod(x3d_TextureEXT,H,lod).rgb;if(!x3d_TextureLinearEXT)lambertian=sRGBToLinear(lambertian);color+=lambertian;break;}case X3D_GGX:case X3D_CHARLIE:{vec3 V=N;vec3 L=normalize(reflect(-V,H));float NdotL=dot(N,L);if(NdotL>0.){if(x3d_RoughnessEXT==0.){lod=x3d_LodBiasEXT;}vec3 sampleColor=textureLod(x3d_TextureEXT,L,lod).rgb;if(!x3d_TextureLinearEXT)sampleColor=sRGBToLinear(sampleColor);color+=sampleColor*NdotL;weight+=NdotL;}break;}}}if(weight!=0.)color/=weight;else color/=float(x3d_SampleCountEXT);return color*x3d_IntensityEXT;}vec3 getNormal(const in int face,const in vec2 t){float x;float y;float z;switch(face){case 0:x=t.x;y=-t.y;z=1.;break;case 1:x=-t.x;y=-t.y;z=-1.;break;case 2:x=-1.;y=-t.y;z=t.x;break;case 3:x=1.;y=-t.y;z=-t.x;break;case 4:x=t.x;y=1.;z=t.y;break;case 5:x=t.x;y=-1.;z=-t.y;break;}return normalize(vec3(x,y,z))*x3d_FlipEXT;}void main(){vec3 normal=getNormal(x3d_CurrentFaceEXT,texCoord);x3d_FragColor=vec4(filterColor(normal),1.);}`
|
|
59353
59311
|
;
|
|
59354
59312
|
|
|
59355
59313
|
/* harmony default export */ const Filter2_fs = (x_ite_Namespace .add ("Filter2.fs", Filter2_fs_default_));
|
|
@@ -59474,19 +59432,18 @@ Object .assign (X3DLightingContext .prototype,
|
|
|
59474
59432
|
// Render the texture.
|
|
59475
59433
|
|
|
59476
59434
|
const
|
|
59477
|
-
gl
|
|
59478
|
-
executionContext
|
|
59479
|
-
|
|
59480
|
-
|
|
59481
|
-
|
|
59482
|
-
|
|
59483
|
-
size = texture .getSize (),
|
|
59484
|
-
filtered = cachedNode ?? executionContext .createNode ("ImageCubeMapTexture", false);
|
|
59435
|
+
gl = this .getContext (),
|
|
59436
|
+
executionContext = texture .getExecutionContext (),
|
|
59437
|
+
shaderNode = this .getEnvironmentTextureShader (),
|
|
59438
|
+
framebuffer = this [_filterFrameBuffer] ??= gl .createFramebuffer (),
|
|
59439
|
+
size = texture .getSize (),
|
|
59440
|
+
filtered = cachedNode ?? executionContext .createNode ("ImageCubeMapTexture", false);
|
|
59485
59441
|
|
|
59486
59442
|
// Setup texture.
|
|
59487
59443
|
|
|
59488
59444
|
if (!cachedNode)
|
|
59489
59445
|
{
|
|
59446
|
+
filtered .updateTextureParameters = Function .prototype;
|
|
59490
59447
|
filtered .setName (name);
|
|
59491
59448
|
filtered .setPrivate (true);
|
|
59492
59449
|
filtered .setLinear (true);
|
|
@@ -59506,9 +59463,14 @@ Object .assign (X3DLightingContext .prototype,
|
|
|
59506
59463
|
|
|
59507
59464
|
if (roughness .length > 1)
|
|
59508
59465
|
{
|
|
59509
|
-
gl .generateMipmap (
|
|
59510
|
-
gl .texParameteri (
|
|
59511
|
-
gl .texParameteri (
|
|
59466
|
+
gl .generateMipmap (filtered .getTarget ());
|
|
59467
|
+
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MIN_FILTER, gl .LINEAR_MIPMAP_LINEAR);
|
|
59468
|
+
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MAG_FILTER, gl .LINEAR);
|
|
59469
|
+
}
|
|
59470
|
+
else
|
|
59471
|
+
{
|
|
59472
|
+
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MIN_FILTER, gl .LINEAR);
|
|
59473
|
+
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MAG_FILTER, gl .LINEAR);
|
|
59512
59474
|
}
|
|
59513
59475
|
|
|
59514
59476
|
// Setup defaults.
|
|
@@ -59517,14 +59479,13 @@ Object .assign (X3DLightingContext .prototype,
|
|
|
59517
59479
|
gl .disable (gl .DEPTH_TEST);
|
|
59518
59480
|
gl .enable (gl .CULL_FACE);
|
|
59519
59481
|
gl .frontFace (gl .CCW);
|
|
59520
|
-
gl .clearColor (0, 0, 0, 0);
|
|
59521
59482
|
gl .bindVertexArray (this .getFullscreenVertexArrayObject ());
|
|
59522
59483
|
|
|
59523
59484
|
// Setup specular texture uniforms.
|
|
59524
59485
|
|
|
59525
59486
|
gl .useProgram (shaderNode .getProgram ());
|
|
59526
59487
|
gl .activeTexture (gl .TEXTURE0);
|
|
59527
|
-
gl .bindTexture (
|
|
59488
|
+
gl .bindTexture (texture .getTarget (), texture .getTexture ());
|
|
59528
59489
|
gl .uniform1i (shaderNode .x3d_TextureEXT, 0);
|
|
59529
59490
|
gl .uniform1i (shaderNode .x3d_TextureSizeEXT, size);
|
|
59530
59491
|
gl .uniform1i (shaderNode .x3d_TextureLinearEXT, texture .isLinear ());
|
|
@@ -59540,28 +59501,23 @@ Object .assign (X3DLightingContext .prototype,
|
|
|
59540
59501
|
|
|
59541
59502
|
// console .log (level, mipSize, r, filtered .getLevels ());
|
|
59542
59503
|
|
|
59543
|
-
// Setup mip level
|
|
59504
|
+
// Setup values for each mip level.
|
|
59544
59505
|
|
|
59506
|
+
gl .viewport (0, 0, mipSize, mipSize);
|
|
59507
|
+
gl .scissor (0, 0, mipSize, mipSize);
|
|
59545
59508
|
gl .uniform1f (shaderNode .x3d_RoughnessEXT, r);
|
|
59546
59509
|
|
|
59547
59510
|
// Generate images.
|
|
59548
59511
|
|
|
59549
|
-
|
|
59550
|
-
gl .scissor (0, 0, mipSize, mipSize);
|
|
59551
|
-
|
|
59552
|
-
for (let i = 0; i < 6; ++ i)
|
|
59512
|
+
for (const [face, target] of filtered .getTargets () .entries ())
|
|
59553
59513
|
{
|
|
59554
|
-
gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0,
|
|
59555
|
-
|
|
59556
|
-
gl .clear (gl .COLOR_BUFFER_BIT);
|
|
59557
|
-
gl .uniform1i (shaderNode .x3d_CurrentFaceEXT, i);
|
|
59514
|
+
gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, target, filtered .getTexture (), level);
|
|
59515
|
+
gl .uniform1i (shaderNode .x3d_CurrentFaceEXT, face);
|
|
59558
59516
|
gl .drawArrays (gl .TRIANGLES, 0, 6);
|
|
59559
59517
|
}
|
|
59560
59518
|
}
|
|
59561
59519
|
|
|
59562
59520
|
gl .enable (gl .DEPTH_TEST);
|
|
59563
|
-
gl .useProgram (currentProgram);
|
|
59564
|
-
gl .bindFramebuffer (gl .FRAMEBUFFER, currentFramebuffer);
|
|
59565
59521
|
|
|
59566
59522
|
return filtered;
|
|
59567
59523
|
},
|
|
@@ -67125,6 +67081,47 @@ vec3 getPunctualRadianceTransmission(const in vec3 normal,const in vec3 view,con
|
|
|
67125
67081
|
;
|
|
67126
67082
|
|
|
67127
67083
|
/* harmony default export */ const Punctual2_glsl = (x_ite_Namespace .add ("Punctual2.glsl", Punctual2_glsl_default_));
|
|
67084
|
+
;// ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
|
|
67085
|
+
const ToneMapping2_glsl_default_ = () => /* glsl */ `
|
|
67086
|
+
const float GAMMA=2.2;const float INV_GAMMA=1./GAMMA;vec3 linearToSRGB(const in vec3 color){return pow(color,vec3(INV_GAMMA));}vec4 linearToSRGB(const in vec4 color){return vec4(linearToSRGB(color.rgb),color.a);}vec3 sRGBToLinear(const in vec3 color){return pow(color,vec3(GAMMA));}vec4 sRGBToLinear(const in vec4 color){return vec4(sRGBToLinear(color.rgb),color.a);}
|
|
67087
|
+
#if defined(X3D_LINEAR_OUTPUT)
|
|
67088
|
+
vec3 toneMap(in vec3 color){
|
|
67089
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
67090
|
+
color=sRGBToLinear(color);
|
|
67091
|
+
#endif
|
|
67092
|
+
return color;}
|
|
67093
|
+
#else
|
|
67094
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
67095
|
+
vec3 toneMapACES_Narkowicz(const in vec3 color){const float A=2.51;const float B=.03;const float C=2.43;const float D=.59;const float E=.14;return clamp((color*(A*color+B))/(color*(C*color+D)+E),0.,1.);}
|
|
67096
|
+
#endif
|
|
67097
|
+
#if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
67098
|
+
const mat3 ACESInputMat=mat3(.59719,.07600,.02840,.35458,.90834,.13383,.04823,.01566,.83777);const mat3 ACESOutputMat=mat3(1.60475,-.10208,-.00327,-.53108,1.10813,-.07276,-.07367,-.00605,1.07602);vec3 RRTAndODTFit(const in vec3 color){vec3 a=color*(color+.0245786)-.000090537;vec3 b=color*(.983729*color+.4329510)+.238081;return a/b;}vec3 toneMapACES_Hill(in vec3 color){color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=clamp(color,0.,1.);return color;}
|
|
67099
|
+
#endif
|
|
67100
|
+
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
67101
|
+
vec3 toneMap_KhronosPbrNeutral(in vec3 color){const float startCompression=.8-.04;const float desaturation=.15;float x=min(color.r,min(color.g,color.b));float offset=x<.08?x-6.25*x*x:.04;color-=offset;float peak=max(color.r,max(color.g,color.b));if(peak<startCompression)return color;const float d=1.-startCompression;float newPeak=1.-d*d/(peak+d-startCompression);color*=newPeak/peak;float g=1.-1./(desaturation*(peak-newPeak)+1.);return mix(color,newPeak*vec3(1),g);}
|
|
67102
|
+
#endif
|
|
67103
|
+
uniform float x3d_Exposure;vec3 toneMap(in vec3 color){color*=x3d_Exposure;
|
|
67104
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
67105
|
+
color=toneMapACES_Narkowicz(color);
|
|
67106
|
+
#endif
|
|
67107
|
+
#if defined(X3D_TONEMAP_ACES_HILL)
|
|
67108
|
+
color=toneMapACES_Hill(color);
|
|
67109
|
+
#endif
|
|
67110
|
+
#if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
67111
|
+
color/=.6;color=toneMapACES_Hill(color);
|
|
67112
|
+
#endif
|
|
67113
|
+
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
67114
|
+
color=toneMap_KhronosPbrNeutral(color);
|
|
67115
|
+
#endif
|
|
67116
|
+
#if defined(X3D_COLORSPACE_LINEAR)
|
|
67117
|
+
color=linearToSRGB(color);
|
|
67118
|
+
#endif
|
|
67119
|
+
return color;}
|
|
67120
|
+
#endif
|
|
67121
|
+
`
|
|
67122
|
+
;
|
|
67123
|
+
|
|
67124
|
+
/* harmony default export */ const ToneMapping2_glsl = (x_ite_Namespace .add ("ToneMapping2.glsl", ToneMapping2_glsl_default_));
|
|
67128
67125
|
;// ./src/assets/shaders/webgl2/Default2.vs.js
|
|
67129
67126
|
const Default2_vs_default_ = () => /* glsl */ `#version 300 es
|
|
67130
67127
|
precision highp int;precision highp float;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
@@ -72148,10 +72145,8 @@ Object .assign (X3DTexturingContext .prototype,
|
|
|
72148
72145
|
textureProperties ._magnificationFilter = "AVG_PIXEL";
|
|
72149
72146
|
textureProperties ._minificationFilter = "AVG_PIXEL";
|
|
72150
72147
|
textureProperties ._textureCompression = "FASTEST";
|
|
72151
|
-
textureProperties ._generateMipMaps = true;
|
|
72152
72148
|
|
|
72153
72149
|
gl .hint (gl .GENERATE_MIPMAP_HINT, gl .FASTEST);
|
|
72154
|
-
//gl .hint (gl .PERSPECTIVE_CORRECTION_HINT, gl .FASTEST);
|
|
72155
72150
|
break;
|
|
72156
72151
|
}
|
|
72157
72152
|
case TextureQuality .MEDIUM:
|
|
@@ -72159,10 +72154,8 @@ Object .assign (X3DTexturingContext .prototype,
|
|
|
72159
72154
|
textureProperties ._magnificationFilter = "NICEST";
|
|
72160
72155
|
textureProperties ._minificationFilter = "NEAREST_PIXEL_AVG_MIPMAP";
|
|
72161
72156
|
textureProperties ._textureCompression = "NICEST";
|
|
72162
|
-
textureProperties ._generateMipMaps = true;
|
|
72163
72157
|
|
|
72164
72158
|
gl .hint (gl .GENERATE_MIPMAP_HINT, gl .FASTEST);
|
|
72165
|
-
//gl .hint (gl .PERSPECTIVE_CORRECTION_HINT, gl .FASTEST);
|
|
72166
72159
|
break;
|
|
72167
72160
|
}
|
|
72168
72161
|
case TextureQuality .HIGH:
|
|
@@ -72170,10 +72163,8 @@ Object .assign (X3DTexturingContext .prototype,
|
|
|
72170
72163
|
textureProperties ._magnificationFilter = "NICEST";
|
|
72171
72164
|
textureProperties ._minificationFilter = "NICEST";
|
|
72172
72165
|
textureProperties ._textureCompression = "NICEST";
|
|
72173
|
-
textureProperties ._generateMipMaps = true;
|
|
72174
72166
|
|
|
72175
72167
|
gl .hint (gl .GENERATE_MIPMAP_HINT, gl .NICEST);
|
|
72176
|
-
//gl .hint (gl .PERSPECTIVE_CORRECTION_HINT, gl .NICEST);
|
|
72177
72168
|
break;
|
|
72178
72169
|
}
|
|
72179
72170
|
}
|
|
@@ -81310,9 +81301,9 @@ Object .assign (EnvironmentLightContainer .prototype,
|
|
|
81310
81301
|
|
|
81311
81302
|
this .modelViewMatrix .push (modelViewMatrix);
|
|
81312
81303
|
},
|
|
81313
|
-
renderShadowMap (renderObject)
|
|
81304
|
+
renderShadowMap (/* renderObject */)
|
|
81314
81305
|
{ },
|
|
81315
|
-
setGlobalVariables (renderObject)
|
|
81306
|
+
setGlobalVariables (/* renderObject */)
|
|
81316
81307
|
{
|
|
81317
81308
|
this .modelViewMatrix .get () .getTransform (null, this .rotation);
|
|
81318
81309
|
|
|
@@ -81392,11 +81383,6 @@ Object .assign (EnvironmentLightContainer .prototype,
|
|
|
81392
81383
|
gl .uniform1i (uniforms .diffuseTextureLevels, diffuseTexture ?.getLevels () ?? 0);
|
|
81393
81384
|
gl .uniform1i (uniforms .specularTextureLevels, specularTexture ?.getLevels () ?? 0);
|
|
81394
81385
|
|
|
81395
|
-
if (lightNode .traverseSpecular)
|
|
81396
|
-
gl .uniform3f (uniforms .flipX, 1, 1, 1);
|
|
81397
|
-
else
|
|
81398
|
-
gl .uniform3f (uniforms .flipX, -1, 1, 1);
|
|
81399
|
-
|
|
81400
81386
|
if (uniforms .sheenTexture)
|
|
81401
81387
|
{
|
|
81402
81388
|
const sheenTexture = lightNode .getSheenTexture ();
|
|
@@ -90973,8 +90959,8 @@ const PNGMedia_default_ = PNGMedia;
|
|
|
90973
90959
|
|
|
90974
90960
|
/* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
|
|
90975
90961
|
;// ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
90976
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
90977
|
-
/* provided dependency */ var APNG = __webpack_require__(
|
|
90962
|
+
/* provided dependency */ var SuperGif = __webpack_require__(72);
|
|
90963
|
+
/* provided dependency */ var APNG = __webpack_require__(402);
|
|
90978
90964
|
|
|
90979
90965
|
|
|
90980
90966
|
|
|
@@ -93679,7 +93665,7 @@ const QuickSort_default_ = QuickSort;
|
|
|
93679
93665
|
|
|
93680
93666
|
/* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
|
|
93681
93667
|
;// ./src/lib/libtess.js
|
|
93682
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
93668
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(258);
|
|
93683
93669
|
const libtess_default_ = libtess_libtess;
|
|
93684
93670
|
;
|
|
93685
93671
|
|