x_ite 16.0.3 → 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 +2 -2
- 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 -9
- 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 +62 -59
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +62 -59
- package/dist/x_ite.zip +0 -0
- package/package.json +1 -1
package/dist/x_ite.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* X_ITE v16.0.
|
|
1
|
+
/* X_ITE v16.0.4 */
|
|
2
2
|
var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 72
|
|
5
5
|
(module, exports) {
|
|
6
6
|
|
|
7
7
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -1006,7 +1006,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1006
1006
|
|
|
1007
1007
|
/***/ },
|
|
1008
1008
|
|
|
1009
|
-
/***/
|
|
1009
|
+
/***/ 402
|
|
1010
1010
|
(module) {
|
|
1011
1011
|
|
|
1012
1012
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -2002,7 +2002,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
2002
2002
|
|
|
2003
2003
|
/***/ },
|
|
2004
2004
|
|
|
2005
|
-
/***/
|
|
2005
|
+
/***/ 258
|
|
2006
2006
|
(module) {
|
|
2007
2007
|
|
|
2008
2008
|
/**
|
|
@@ -18826,7 +18826,7 @@ const Legacy_default_ = Legacy;
|
|
|
18826
18826
|
|
|
18827
18827
|
/* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
|
|
18828
18828
|
;// ./src/x_ite/BROWSER_VERSION.js
|
|
18829
|
-
const BROWSER_VERSION_default_ = "16.0.
|
|
18829
|
+
const BROWSER_VERSION_default_ = "16.0.4";
|
|
18830
18830
|
;
|
|
18831
18831
|
|
|
18832
18832
|
/* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
|
|
@@ -31113,7 +31113,7 @@ const Plane3_default_ = Plane3;
|
|
|
31113
31113
|
|
|
31114
31114
|
/* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
|
|
31115
31115
|
;// ./src/standard/Math/Geometry/Triangle3.js
|
|
31116
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
31116
|
+
/* provided dependency */ var libtess = __webpack_require__(258);
|
|
31117
31117
|
|
|
31118
31118
|
|
|
31119
31119
|
const Triangle3 =
|
|
@@ -47743,7 +47743,7 @@ const Bezier_default_ = Bezier;
|
|
|
47743
47743
|
|
|
47744
47744
|
/* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
|
|
47745
47745
|
;// ./src/x_ite/Parser/SVGParser.js
|
|
47746
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
47746
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(258);
|
|
47747
47747
|
|
|
47748
47748
|
|
|
47749
47749
|
|
|
@@ -54435,7 +54435,7 @@ function X3DCoreContext (element)
|
|
|
54435
54435
|
{
|
|
54436
54436
|
const link = document .createElement ("link");
|
|
54437
54437
|
|
|
54438
|
-
link .integrity = "sha384-
|
|
54438
|
+
link .integrity = "sha384-r/Gb5cpjKIPkLAwOrsKEHLP6i0CMS4kHdw86CIUHces4jE1JV+E2ip+Bb42dwD2D";
|
|
54439
54439
|
link .rel = "stylesheet";
|
|
54440
54440
|
link .crossOrigin = "anonymous";
|
|
54441
54441
|
link .onload = resolve;
|
|
@@ -59266,47 +59266,6 @@ const X3DLayeringContext_default_ = X3DLayeringContext;
|
|
|
59266
59266
|
;
|
|
59267
59267
|
|
|
59268
59268
|
/* harmony default export */ const Layering_X3DLayeringContext = (x_ite_Namespace .add ("X3DLayeringContext", X3DLayeringContext_default_));
|
|
59269
|
-
;// ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
|
|
59270
|
-
const ToneMapping2_glsl_default_ = () => /* glsl */ `
|
|
59271
|
-
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);}
|
|
59272
|
-
#if defined(X3D_LINEAR_OUTPUT)
|
|
59273
|
-
vec3 toneMap(in vec3 color){
|
|
59274
|
-
#if defined(X3D_COLORSPACE_SRGB)
|
|
59275
|
-
color=sRGBToLinear(color);
|
|
59276
|
-
#endif
|
|
59277
|
-
return color;}
|
|
59278
|
-
#else
|
|
59279
|
-
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
59280
|
-
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.);}
|
|
59281
|
-
#endif
|
|
59282
|
-
#if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
59283
|
-
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;}
|
|
59284
|
-
#endif
|
|
59285
|
-
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
59286
|
-
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);}
|
|
59287
|
-
#endif
|
|
59288
|
-
uniform float x3d_Exposure;vec3 toneMap(in vec3 color){color*=x3d_Exposure;
|
|
59289
|
-
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
59290
|
-
color=toneMapACES_Narkowicz(color);
|
|
59291
|
-
#endif
|
|
59292
|
-
#if defined(X3D_TONEMAP_ACES_HILL)
|
|
59293
|
-
color=toneMapACES_Hill(color);
|
|
59294
|
-
#endif
|
|
59295
|
-
#if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
59296
|
-
color/=.6;color=toneMapACES_Hill(color);
|
|
59297
|
-
#endif
|
|
59298
|
-
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
59299
|
-
color=toneMap_KhronosPbrNeutral(color);
|
|
59300
|
-
#endif
|
|
59301
|
-
#if defined(X3D_COLORSPACE_LINEAR)
|
|
59302
|
-
color=linearToSRGB(color);
|
|
59303
|
-
#endif
|
|
59304
|
-
return color;}
|
|
59305
|
-
#endif
|
|
59306
|
-
`
|
|
59307
|
-
;
|
|
59308
|
-
|
|
59309
|
-
/* harmony default export */ const ToneMapping2_glsl = (x_ite_Namespace .add ("ToneMapping2.glsl", ToneMapping2_glsl_default_));
|
|
59310
59269
|
;// ./src/x_ite/Browser/Lighting/Distribution.js
|
|
59311
59270
|
let Distribution_i = 0;
|
|
59312
59271
|
|
|
@@ -59324,12 +59283,11 @@ const Distribution_default_ = Distribution;
|
|
|
59324
59283
|
;// ./src/x_ite/Browser/Lighting/Filter2.fs.js
|
|
59325
59284
|
|
|
59326
59285
|
|
|
59327
|
-
|
|
59328
59286
|
const Filter2_fs_default_ = /* glsl */ `#version 300 es
|
|
59329
59287
|
precision highp float;precision highp int;precision highp samplerCube;
|
|
59330
|
-
|
|
59288
|
+
#include<ToneMapping>
|
|
59331
59289
|
${Object .entries (Lighting_Distribution) .map (([name, value]) => `#define X3D_${name} ${value}`) .join ("\n")}
|
|
59332
|
-
const float M_PI=3.
|
|
59290
|
+
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.);}`
|
|
59333
59291
|
;
|
|
59334
59292
|
|
|
59335
59293
|
/* harmony default export */ const Filter2_fs = (x_ite_Namespace .add ("Filter2.fs", Filter2_fs_default_));
|
|
@@ -59489,6 +59447,11 @@ Object .assign (X3DLightingContext .prototype,
|
|
|
59489
59447
|
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MIN_FILTER, gl .LINEAR_MIPMAP_LINEAR);
|
|
59490
59448
|
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MAG_FILTER, gl .LINEAR);
|
|
59491
59449
|
}
|
|
59450
|
+
else
|
|
59451
|
+
{
|
|
59452
|
+
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MIN_FILTER, gl .LINEAR);
|
|
59453
|
+
gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MAG_FILTER, gl .LINEAR);
|
|
59454
|
+
}
|
|
59492
59455
|
|
|
59493
59456
|
// Setup defaults.
|
|
59494
59457
|
|
|
@@ -59518,15 +59481,14 @@ Object .assign (X3DLightingContext .prototype,
|
|
|
59518
59481
|
|
|
59519
59482
|
// console .log (level, mipSize, r, filtered .getLevels ());
|
|
59520
59483
|
|
|
59521
|
-
// Setup mip level
|
|
59484
|
+
// Setup values for each mip level.
|
|
59522
59485
|
|
|
59486
|
+
gl .viewport (0, 0, mipSize, mipSize);
|
|
59487
|
+
gl .scissor (0, 0, mipSize, mipSize);
|
|
59523
59488
|
gl .uniform1f (shaderNode .x3d_RoughnessEXT, r);
|
|
59524
59489
|
|
|
59525
59490
|
// Generate images.
|
|
59526
59491
|
|
|
59527
|
-
gl .viewport (0, 0, mipSize, mipSize);
|
|
59528
|
-
gl .scissor (0, 0, mipSize, mipSize);
|
|
59529
|
-
|
|
59530
59492
|
for (const [face, target] of filtered .getTargets () .entries ())
|
|
59531
59493
|
{
|
|
59532
59494
|
gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, target, filtered .getTexture (), level);
|
|
@@ -67099,6 +67061,47 @@ vec3 getPunctualRadianceTransmission(const in vec3 normal,const in vec3 view,con
|
|
|
67099
67061
|
;
|
|
67100
67062
|
|
|
67101
67063
|
/* harmony default export */ const Punctual2_glsl = (x_ite_Namespace .add ("Punctual2.glsl", Punctual2_glsl_default_));
|
|
67064
|
+
;// ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
|
|
67065
|
+
const ToneMapping2_glsl_default_ = () => /* glsl */ `
|
|
67066
|
+
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);}
|
|
67067
|
+
#if defined(X3D_LINEAR_OUTPUT)
|
|
67068
|
+
vec3 toneMap(in vec3 color){
|
|
67069
|
+
#if defined(X3D_COLORSPACE_SRGB)
|
|
67070
|
+
color=sRGBToLinear(color);
|
|
67071
|
+
#endif
|
|
67072
|
+
return color;}
|
|
67073
|
+
#else
|
|
67074
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
67075
|
+
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.);}
|
|
67076
|
+
#endif
|
|
67077
|
+
#if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
67078
|
+
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;}
|
|
67079
|
+
#endif
|
|
67080
|
+
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
67081
|
+
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);}
|
|
67082
|
+
#endif
|
|
67083
|
+
uniform float x3d_Exposure;vec3 toneMap(in vec3 color){color*=x3d_Exposure;
|
|
67084
|
+
#if defined(X3D_TONEMAP_ACES_NARKOWICZ)
|
|
67085
|
+
color=toneMapACES_Narkowicz(color);
|
|
67086
|
+
#endif
|
|
67087
|
+
#if defined(X3D_TONEMAP_ACES_HILL)
|
|
67088
|
+
color=toneMapACES_Hill(color);
|
|
67089
|
+
#endif
|
|
67090
|
+
#if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
|
|
67091
|
+
color/=.6;color=toneMapACES_Hill(color);
|
|
67092
|
+
#endif
|
|
67093
|
+
#if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
|
|
67094
|
+
color=toneMap_KhronosPbrNeutral(color);
|
|
67095
|
+
#endif
|
|
67096
|
+
#if defined(X3D_COLORSPACE_LINEAR)
|
|
67097
|
+
color=linearToSRGB(color);
|
|
67098
|
+
#endif
|
|
67099
|
+
return color;}
|
|
67100
|
+
#endif
|
|
67101
|
+
`
|
|
67102
|
+
;
|
|
67103
|
+
|
|
67104
|
+
/* harmony default export */ const ToneMapping2_glsl = (x_ite_Namespace .add ("ToneMapping2.glsl", ToneMapping2_glsl_default_));
|
|
67102
67105
|
;// ./src/assets/shaders/webgl2/Default2.vs.js
|
|
67103
67106
|
const Default2_vs_default_ = () => /* glsl */ `#version 300 es
|
|
67104
67107
|
precision highp int;precision highp float;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
|
|
@@ -90936,8 +90939,8 @@ const PNGMedia_default_ = PNGMedia;
|
|
|
90936
90939
|
|
|
90937
90940
|
/* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
|
|
90938
90941
|
;// ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
90939
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
90940
|
-
/* provided dependency */ var APNG = __webpack_require__(
|
|
90942
|
+
/* provided dependency */ var SuperGif = __webpack_require__(72);
|
|
90943
|
+
/* provided dependency */ var APNG = __webpack_require__(402);
|
|
90941
90944
|
|
|
90942
90945
|
|
|
90943
90946
|
|
|
@@ -93642,7 +93645,7 @@ const QuickSort_default_ = QuickSort;
|
|
|
93642
93645
|
|
|
93643
93646
|
/* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
|
|
93644
93647
|
;// ./src/lib/libtess.js
|
|
93645
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
93648
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(258);
|
|
93646
93649
|
const libtess_default_ = libtess_libtess;
|
|
93647
93650
|
;
|
|
93648
93651
|
|
package/dist/x_ite.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED