@onerjs/core 8.28.0 → 8.28.2
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/Behaviors/Meshes/handConstraintBehavior.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +40 -16
- package/Collisions/gpuPicker.js +216 -95
- package/Collisions/gpuPicker.js.map +1 -1
- package/Decorators/nodeDecorator.d.ts +5 -1
- package/Decorators/nodeDecorator.js +4 -0
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.d.ts +30 -0
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.js +56 -0
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.d.ts +32 -0
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.js +62 -0
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.d.ts +36 -0
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.js +88 -0
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/index.d.ts +3 -0
- package/FrameGraph/Node/Blocks/index.js +3 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.d.ts +17 -0
- package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.js +18 -0
- package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/filterTask.d.ts +16 -0
- package/FrameGraph/Tasks/PostProcesses/filterTask.js +17 -0
- package/FrameGraph/Tasks/PostProcesses/filterTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/tonemapTask.d.ts +16 -0
- package/FrameGraph/Tasks/PostProcesses/tonemapTask.js +17 -0
- package/FrameGraph/Tasks/PostProcesses/tonemapTask.js.map +1 -0
- package/FrameGraph/index.d.ts +3 -0
- package/FrameGraph/index.js +3 -0
- package/FrameGraph/index.js.map +1 -1
- package/Materials/Textures/texture.js +9 -2
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/effect.d.ts +1 -0
- package/Materials/effect.js +7 -1
- package/Materials/effect.js.map +1 -1
- package/Particles/gpuParticleSystem.js +2 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.js +4 -3
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Physics/v2/physicsAggregate.js +4 -3
- package/Physics/v2/physicsAggregate.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.d.ts +3 -3
- package/PostProcesses/colorCorrectionPostProcess.js +21 -21
- package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
- package/PostProcesses/filterPostProcess.d.ts +4 -2
- package/PostProcesses/filterPostProcess.js +22 -15
- package/PostProcesses/filterPostProcess.js.map +1 -1
- package/PostProcesses/index.d.ts +3 -0
- package/PostProcesses/index.js +3 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/thinColorCorrectionPostProcess.d.ts +30 -0
- package/PostProcesses/thinColorCorrectionPostProcess.js +52 -0
- package/PostProcesses/thinColorCorrectionPostProcess.js.map +1 -0
- package/PostProcesses/thinFilterPostProcess.d.ts +29 -0
- package/PostProcesses/thinFilterPostProcess.js +51 -0
- package/PostProcesses/thinFilterPostProcess.js.map +1 -0
- package/PostProcesses/thinTonemapPostProcess.d.ts +52 -0
- package/PostProcesses/thinTonemapPostProcess.js +83 -0
- package/PostProcesses/thinTonemapPostProcess.js.map +1 -0
- package/PostProcesses/tonemapPostProcess.d.ts +23 -21
- package/PostProcesses/tonemapPostProcess.js +55 -46
- package/PostProcesses/tonemapPostProcess.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +6 -1
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Shaders/geometry.fragment.js +3 -1
- package/Shaders/geometry.fragment.js.map +1 -1
- package/Shaders/geometry.vertex.js +10 -2
- package/Shaders/geometry.vertex.js.map +1 -1
- package/Shaders/picking.fragment.js +20 -6
- package/Shaders/picking.fragment.js.map +1 -1
- package/Shaders/picking.vertex.js +4 -3
- package/Shaders/picking.vertex.js.map +1 -1
- package/ShadersWGSL/geometry.fragment.js +3 -1
- package/ShadersWGSL/geometry.fragment.js.map +1 -1
- package/ShadersWGSL/geometry.vertex.js +10 -2
- package/ShadersWGSL/geometry.vertex.js.map +1 -1
- package/ShadersWGSL/picking.fragment.js +11 -6
- package/ShadersWGSL/picking.fragment.js.map +1 -1
- package/ShadersWGSL/picking.vertex.js +4 -3
- package/ShadersWGSL/picking.vertex.js.map +1 -1
- package/XR/features/WebXRAnchorSystem.d.ts +1 -1
- package/XR/features/WebXRBackgroundRemover.d.ts +1 -1
- package/XR/features/WebXRControllerMovement.d.ts +1 -1
- package/XR/features/WebXRControllerPhysics.d.ts +1 -1
- package/XR/features/WebXRControllerPointerSelection.d.ts +1 -1
- package/XR/features/WebXRControllerTeleportation.d.ts +1 -1
- package/XR/features/WebXRDOMOverlay.d.ts +1 -1
- package/XR/features/WebXRDepthSensing.d.ts +1 -1
- package/XR/features/WebXREyeTracking.d.ts +1 -1
- package/XR/features/WebXRFeaturePointSystem.d.ts +1 -1
- package/XR/features/WebXRHandTracking.d.ts +1 -1
- package/XR/features/WebXRHitTest.d.ts +1 -1
- package/XR/features/WebXRHitTestLegacy.d.ts +1 -1
- package/XR/features/WebXRImageTracking.d.ts +1 -1
- package/XR/features/WebXRLayers.d.ts +1 -1
- package/XR/features/WebXRLightEstimation.d.ts +1 -1
- package/XR/features/WebXRMeshDetector.d.ts +1 -1
- package/XR/features/WebXRNearInteraction.d.ts +1 -1
- package/XR/features/WebXRPlaneDetector.d.ts +1 -1
- package/XR/features/WebXRRawCameraAccess.d.ts +1 -1
- package/XR/features/WebXRSpaceWarp.d.ts +1 -1
- package/XR/webXRDefaultExperience.js +1 -1
- package/XR/webXRDefaultExperience.js.map +1 -1
- package/XR/webXRFeaturesManager.d.ts +116 -27
- package/XR/webXRFeaturesManager.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/geometry.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,4CAA4C,CAAC;AACpD,OAAO,yCAAyC,CAAC;AACjD,OAAO,6CAA6C,CAAC;AACrD,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,6BAA6B,CAAC;AAErC,MAAM,IAAI,GAAG,sBAAsB,CAAC;AACpC,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"geometry.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/geometry.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,4CAA4C,CAAC;AACpD,OAAO,yCAAyC,CAAC;AACjD,OAAO,6CAA6C,CAAC;AACrD,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,6BAA6B,CAAC;AAErC,MAAM,IAAI,GAAG,sBAAsB,CAAC;AACpC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyKd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/bonesDeclaration\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration\";\nimport \"./ShadersInclude/instancesDeclaration\";\nimport \"./ShadersInclude/geometryVertexDeclaration\";\nimport \"./ShadersInclude/geometryUboDeclaration\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal\";\nimport \"./ShadersInclude/morphTargetsVertex\";\nimport \"./ShadersInclude/instancesVertex\";\nimport \"./ShadersInclude/bonesVertex\";\nimport \"./ShadersInclude/bakedVertexAnimation\";\nimport \"./ShadersInclude/clipPlaneVertex\";\nimport \"./ShadersInclude/bumpVertex\";\n\nconst name = \"geometryVertexShader\";\nconst shader = `precision highp float;\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#include<instancesDeclaration>\n#include<__decl__geometryVertex>\n#include<clipPlaneVertexDeclaration>\nattribute vec3 position;\n#ifdef HAS_NORMAL_ATTRIBUTE\nattribute vec3 normal;\n#endif\n#ifdef NEED_UV\nvarying vec2 vUV;\n#ifdef ALPHATEST\nuniform mat4 diffuseMatrix;\n#endif\n#ifdef BUMP\nuniform mat4 bumpMatrix;varying vec2 vBumpUV;\n#endif\n#ifdef REFLECTIVITY\nuniform mat4 reflectivityMatrix;uniform mat4 albedoMatrix;varying vec2 vReflectivityUV;varying vec2 vAlbedoUV;\n#endif\n#ifdef METALLIC_TEXTURE\nvarying vec2 vMetallicUV;uniform mat4 metallicMatrix;\n#endif\n#ifdef ROUGHNESS_TEXTURE\nvarying vec2 vRoughnessUV;uniform mat4 roughnessMatrix;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#ifdef BUMP\nvarying mat4 vWorldView;\n#endif\n#ifdef BUMP\nvarying vec3 vNormalW;\n#else\nvarying vec3 vNormalV;\n#endif\nvarying vec4 vViewPos;\n#if defined(POSITION) || defined(BUMP)\nvarying vec3 vPositionW;\n#endif\n#if defined(VELOCITY) || defined(VELOCITY_LINEAR)\nuniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\n{vec3 positionUpdated=position;\n#ifdef HAS_NORMAL_ATTRIBUTE\nvec3 normalUpdated=normal;\n#else\nvec3 normalUpdated=vec3(0.0,0.0,0.0);\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#ifdef UV2\nvec2 uv2Updated=uv2;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#include<instancesVertex>\n#if (defined(VELOCITY) || defined(VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=vec4(finalWorld*vec4(positionUpdated,1.0));\n#ifdef BUMP\nvWorldView=view*finalWorld;mat3 normalWorld=mat3(finalWorld);vNormalW=normalize(normalWorld*normalUpdated);\n#else\n#ifdef NORMAL_WORLDSPACE\nvNormalV=normalize(vec3(finalWorld*vec4(normalUpdated,0.0)));\n#else\nvNormalV=normalize(vec3((view*finalWorld)*vec4(normalUpdated,0.0)));\n#endif\n#endif\nvViewPos=view*worldPos;\n#if (defined(VELOCITY) || defined(VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#if NUM_BONE_INFLUENCERS>0\nmat4 previousInfluence;previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\nvPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*vec4(positionUpdated,1.0);\n#else\nvPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#endif\n#if defined(POSITION) || defined(BUMP)\nvPositionW=worldPos.xyz/worldPos.w;\n#endif\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#include<clipPlaneVertex>\n#ifdef NEED_UV\n#ifdef UV1\n#if defined(ALPHATEST) && defined(ALPHATEST_UV1)\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#else\nvUV=uvUpdated;\n#endif\n#ifdef BUMP_UV1\nvBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef REFLECTIVITY_UV1\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0));\n#else\n#ifdef METALLIC_UV1\nvMetallicUV=vec2(metallicMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef ROUGHNESS_UV1\nvRoughnessUV=vec2(roughnessMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#endif\n#ifdef ALBEDO_UV1\nvAlbedoUV=vec2(albedoMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#endif\n#ifdef UV2\n#if defined(ALPHATEST) && defined(ALPHATEST_UV2)\nvUV=vec2(diffuseMatrix*vec4(uv2Updated,1.0,0.0));\n#else\nvUV=uv2Updated;\n#endif\n#ifdef BUMP_UV2\nvBumpUV=vec2(bumpMatrix*vec4(uv2Updated,1.0,0.0));\n#endif\n#ifdef REFLECTIVITY_UV2\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv2Updated,1.0,0.0));\n#else\n#ifdef METALLIC_UV2\nvMetallicUV=vec2(metallicMatrix*vec4(uv2Updated,1.0,0.0));\n#endif\n#ifdef ROUGHNESS_UV2\nvRoughnessUV=vec2(roughnessMatrix*vec4(uv2Updated,1.0,0.0));\n#endif\n#endif\n#ifdef ALBEDO_UV2\nvAlbedoUV=vec2(albedoMatrix*vec4(uv2Updated,1.0,0.0));\n#endif\n#endif\n#endif\n#include<bumpVertex>\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const geometryVertexShader = { name, shader };\n"]}
|
|
@@ -2,17 +2,31 @@
|
|
|
2
2
|
import { ShaderStore } from "../Engines/shaderStore.js";
|
|
3
3
|
const name = "pickingPixelShader";
|
|
4
4
|
const shader = `#if defined(INSTANCES)
|
|
5
|
-
varying
|
|
5
|
+
varying float vMeshID;
|
|
6
6
|
#else
|
|
7
|
-
uniform
|
|
7
|
+
uniform float meshID;
|
|
8
8
|
#endif
|
|
9
|
-
void main(void) {
|
|
9
|
+
void main(void) {float id;
|
|
10
10
|
#if defined(INSTANCES)
|
|
11
|
-
|
|
11
|
+
id=vMeshID;
|
|
12
12
|
#else
|
|
13
|
-
|
|
13
|
+
id=meshID;
|
|
14
14
|
#endif
|
|
15
|
-
|
|
15
|
+
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
|
|
16
|
+
int castedId=int(id);vec3 color=vec3(
|
|
17
|
+
float((castedId>>16) & 0xFF),
|
|
18
|
+
float((castedId>>8) & 0xFF),
|
|
19
|
+
float(castedId & 0xFF)
|
|
20
|
+
)/255.0;gl_FragColor=vec4(color,1.0);
|
|
21
|
+
#else
|
|
22
|
+
float castedId=floor(id+0.5);vec3 color=vec3(
|
|
23
|
+
floor(mod(castedId,16777216.0)/65536.0),
|
|
24
|
+
floor(mod(castedId,65536.0)/256.0),
|
|
25
|
+
mod(castedId,256.0)
|
|
26
|
+
)/255.0;gl_FragColor=vec4(color,1.0);
|
|
27
|
+
#endif
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
16
30
|
// Sideeffect
|
|
17
31
|
if (!ShaderStore.ShadersStore[name]) {
|
|
18
32
|
ShaderStore.ShadersStore[name] = shader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picking.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/picking.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"picking.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/picking.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"pickingPixelShader\";\nconst shader = `#if defined(INSTANCES)\nvarying float vMeshID;\n#else\nuniform float meshID;\n#endif\nvoid main(void) {float id;\n#if defined(INSTANCES)\nid=vMeshID;\n#else\nid=meshID;\n#endif\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nint castedId=int(id);vec3 color=vec3(\nfloat((castedId>>16) & 0xFF),\nfloat((castedId>>8) & 0xFF),\nfloat(castedId & 0xFF)\n)/255.0;gl_FragColor=vec4(color,1.0);\n#else\nfloat castedId=floor(id+0.5);vec3 color=vec3(\nfloor(mod(castedId,16777216.0)/65536.0),\nfloor(mod(castedId,65536.0)/256.0),\nmod(castedId,256.0)\n)/255.0;gl_FragColor=vec4(color,1.0);\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const pickingPixelShader = { name, shader };\n"]}
|
|
@@ -13,7 +13,7 @@ import "./ShadersInclude/bakedVertexAnimation.js";
|
|
|
13
13
|
const name = "pickingVertexShader";
|
|
14
14
|
const shader = `attribute vec3 position;
|
|
15
15
|
#if defined(INSTANCES)
|
|
16
|
-
attribute
|
|
16
|
+
attribute float instanceMeshID;
|
|
17
17
|
#endif
|
|
18
18
|
#include<bonesDeclaration>
|
|
19
19
|
#include<bakedVertexAnimationDeclaration>
|
|
@@ -22,7 +22,7 @@ attribute vec4 instanceMeshID;
|
|
|
22
22
|
#include<instancesDeclaration>
|
|
23
23
|
uniform mat4 viewProjection;
|
|
24
24
|
#if defined(INSTANCES)
|
|
25
|
-
varying
|
|
25
|
+
varying float vMeshID;
|
|
26
26
|
#endif
|
|
27
27
|
void main(void) {
|
|
28
28
|
#include<morphTargetsVertexGlobal>
|
|
@@ -34,7 +34,8 @@ vec4 worldPos=finalWorld*vec4(position,1.0);gl_Position=viewProjection*worldPos;
|
|
|
34
34
|
#if defined(INSTANCES)
|
|
35
35
|
vMeshID=instanceMeshID;
|
|
36
36
|
#endif
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
38
39
|
// Sideeffect
|
|
39
40
|
if (!ShaderStore.ShadersStore[name]) {
|
|
40
41
|
ShaderStore.ShadersStore[name] = shader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picking.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/picking.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAE/C,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"picking.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/picking.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAE/C,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/bonesDeclaration\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration\";\nimport \"./ShadersInclude/instancesDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal\";\nimport \"./ShadersInclude/morphTargetsVertex\";\nimport \"./ShadersInclude/instancesVertex\";\nimport \"./ShadersInclude/bonesVertex\";\nimport \"./ShadersInclude/bakedVertexAnimation\";\n\nconst name = \"pickingVertexShader\";\nconst shader = `attribute vec3 position;\n#if defined(INSTANCES)\nattribute float instanceMeshID;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#include<instancesDeclaration>\nuniform mat4 viewProjection;\n#if defined(INSTANCES)\nvarying float vMeshID;\n#endif\nvoid main(void) {\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(position,1.0);gl_Position=viewProjection*worldPos;\n#if defined(INSTANCES)\nvMeshID=instanceMeshID;\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const pickingVertexShader = { name, shader };\n"]}
|
|
@@ -74,8 +74,10 @@ normalOutput=normalW;
|
|
|
74
74
|
#else
|
|
75
75
|
normalOutput=normalize( (mat4x4f(input.vWorldView0,input.vWorldView1,input.vWorldView2,input.vWorldView3)* vec4f(normalW,0.0)).xyz);
|
|
76
76
|
#endif
|
|
77
|
-
#
|
|
77
|
+
#elif defined(HAS_NORMAL_ATTRIBUTE)
|
|
78
78
|
normalOutput=normalize(input.vNormalV);
|
|
79
|
+
#elif defined(POSITION)
|
|
80
|
+
normalOutput=normalize(-cross(dpdx(input.vPositionW),dpdy(input.vPositionW)));
|
|
79
81
|
#endif
|
|
80
82
|
#ifdef ENCODE_NORMAL
|
|
81
83
|
normalOutput=normalOutput*0.5+0.5;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/geometry.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AACpD,OAAO,wCAAwC,CAAC;AAChD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,+BAA+B,CAAC;AAEvC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"geometry.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/geometry.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AACpD,OAAO,wCAAwC,CAAC;AAChD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,+BAA+B,CAAC;AAEvC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Kd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/clipPlaneFragmentDeclaration\";\nimport \"./ShadersInclude/bumpFragmentMainFunctions\";\nimport \"./ShadersInclude/bumpFragmentFunctions\";\nimport \"./ShadersInclude/helperFunctions\";\nimport \"./ShadersInclude/clipPlaneFragment\";\nimport \"./ShadersInclude/bumpFragment\";\n\nconst name = \"geometryPixelShader\";\nconst shader = `#ifdef BUMP\nvarying vWorldView0: vec4f;varying vWorldView1: vec4f;varying vWorldView2: vec4f;varying vWorldView3: vec4f;varying vNormalW: vec3f;\n#else\nvarying vNormalV: vec3f;\n#endif\nvarying vViewPos: vec4f;\n#if defined(POSITION) || defined(BUMP)\nvarying vPositionW: vec3f;\n#endif\n#if defined(VELOCITY) || defined(VELOCITY_LINEAR)\nvarying vCurrentPosition: vec4f;varying vPreviousPosition: vec4f;\n#endif\n#ifdef NEED_UV\nvarying vUV: vec2f;\n#endif\n#ifdef BUMP\nuniform vBumpInfos: vec3f;uniform vTangentSpaceParams: vec2f;\n#endif\n#if defined(REFLECTIVITY)\n#if defined(ORMTEXTURE) || defined(SPECULARGLOSSINESSTEXTURE) || defined(REFLECTIVITYTEXTURE)\nvar reflectivitySamplerSampler: sampler;var reflectivitySampler: texture_2d<f32>;varying vReflectivityUV: vec2f;\n#else\n#ifdef METALLIC_TEXTURE\nvar metallicSamplerSampler: sampler;var metallicSampler: texture_2d<f32>;varying vMetallicUV: vec2f;\n#endif\n#ifdef ROUGHNESS_TEXTURE\nvar roughnessSamplerSampler: sampler;var roughnessSampler: texture_2d<f32>;varying vRoughnessUV: vec2f;\n#endif\n#endif\n#ifdef ALBEDOTEXTURE\nvarying vAlbedoUV: vec2f;var albedoSamplerSampler: sampler;var albedoSampler: texture_2d<f32>;\n#endif\n#ifdef REFLECTIVITYCOLOR\nuniform reflectivityColor: vec3f;\n#endif\n#ifdef ALBEDOCOLOR\nuniform albedoColor: vec3f;\n#endif\n#ifdef METALLIC\nuniform metallic: f32;\n#endif\n#if defined(ROUGHNESS) || defined(GLOSSINESS)\nuniform glossiness: f32;\n#endif\n#endif\n#if defined(ALPHATEST) && defined(NEED_UV)\nvar diffuseSamplerSampler: sampler;var diffuseSampler: texture_2d<f32>;\n#endif\n#include<clipPlaneFragmentDeclaration>\n#include<bumpFragmentMainFunctions>\n#include<bumpFragmentFunctions>\n#include<helperFunctions>\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#include<clipPlaneFragment>\n#ifdef ALPHATEST\nif (textureSample(diffuseSampler,diffuseSamplerSampler,input.vUV).a<0.4) {discard;}\n#endif\nvar normalOutput: vec3f;\n#ifdef BUMP\nvar normalW: vec3f=normalize(input.vNormalW);\n#include<bumpFragment>\n#ifdef NORMAL_WORLDSPACE\nnormalOutput=normalW;\n#else\nnormalOutput=normalize( (mat4x4f(input.vWorldView0,input.vWorldView1,input.vWorldView2,input.vWorldView3)* vec4f(normalW,0.0)).xyz);\n#endif\n#elif defined(HAS_NORMAL_ATTRIBUTE)\nnormalOutput=normalize(input.vNormalV);\n#elif defined(POSITION)\nnormalOutput=normalize(-cross(dpdx(input.vPositionW),dpdy(input.vPositionW)));\n#endif\n#ifdef ENCODE_NORMAL\nnormalOutput=normalOutput*0.5+0.5;\n#endif\nvar fragData: array<vec4<f32>,SCENE_MRT_COUNT>;\n#ifdef DEPTH\nfragData[DEPTH_INDEX]=vec4f(input.vViewPos.z/input.vViewPos.w,0.0,0.0,1.0);\n#endif\n#ifdef NORMAL\nfragData[NORMAL_INDEX]=vec4f(normalOutput,1.0);\n#endif\n#ifdef SCREENSPACE_DEPTH\nfragData[SCREENSPACE_DEPTH_INDEX]=vec4f(fragmentInputs.position.z,0.0,0.0,1.0);\n#endif\n#ifdef POSITION\nfragData[POSITION_INDEX]= vec4f(input.vPositionW,1.0);\n#endif\n#ifdef VELOCITY\nvar a: vec2f=(input.vCurrentPosition.xy/input.vCurrentPosition.w)*0.5+0.5;var b: vec2f=(input.vPreviousPosition.xy/input.vPreviousPosition.w)*0.5+0.5;var velocity: vec2f=abs(a-b);velocity= vec2f(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5;fragData[VELOCITY_INDEX]= vec4f(velocity,0.0,1.0);\n#endif\n#ifdef VELOCITY_LINEAR\nvar velocity : vec2f=vec2f(0.5)*((input.vPreviousPosition.xy /\ninput.vPreviousPosition.w) -\n(input.vCurrentPosition.xy /\ninput.vCurrentPosition.w));fragData[VELOCITY_LINEAR_INDEX]=vec4f(velocity,0.0,1.0);\n#endif\n#ifdef REFLECTIVITY\nvar reflectivity: vec4f= vec4f(0.0,0.0,0.0,1.0);\n#ifdef METALLICWORKFLOW\nvar metal: f32=1.0;var roughness: f32=1.0;\n#ifdef ORMTEXTURE\nmetal*=textureSample(reflectivitySampler,reflectivitySamplerSampler,input.vReflectivityUV).b;roughness*=textureSample(reflectivitySampler,reflectivitySamplerSampler,input.vReflectivityUV).g;\n#else\n#ifdef METALLIC_TEXTURE\nmetal*=textureSample(metallicSampler,metallicSamplerSampler,input.vMetallicUV).r;\n#endif\n#ifdef ROUGHNESS_TEXTURE\nroughness*=textureSample(roughnessSampler,roughnessSamplerSampler,input.vRoughnessUV).r;\n#endif\n#endif\n#ifdef METALLIC\nmetal*=uniforms.metallic;\n#endif\n#ifdef ROUGHNESS\nroughness*=(1.0-uniforms.glossiness); \n#endif\nreflectivity=vec4f(reflectivity.rgb,reflectivity.a-roughness);var color: vec3f= vec3f(1.0);\n#ifdef ALBEDOTEXTURE\ncolor=textureSample(albedoSampler,albedoSamplerSampler,input.vAlbedoUV).rgb;\n#ifdef GAMMAALBEDO\ncolor=toLinearSpaceVec4(color);\n#endif\n#endif\n#ifdef ALBEDOCOLOR\ncolor*=uniforms.albedoColor.xyz;\n#endif\nreflectivity=vec4f(mix( vec3f(0.04),color,metal),reflectivity.a);\n#else\n#if defined(SPECULARGLOSSINESSTEXTURE) || defined(REFLECTIVITYTEXTURE)\nreflectivity=textureSample(reflectivitySampler,reflectivitySamplerSampler,input.vReflectivityUV);\n#ifdef GAMMAREFLECTIVITYTEXTURE\nreflectivity=vec4f(toLinearSpaceVec3(reflectivity.rgb),reflectivity.a);\n#endif\n#else \n#ifdef REFLECTIVITYCOLOR\nreflectivity=vec4f(toLinearSpaceVec3(uniforms.reflectivityColor.xyz),1.0);\n#endif\n#endif\n#ifdef GLOSSINESSS\nreflectivity=vec4f(reflectivity.rgb,reflectivity.a*glossiness); \n#endif\n#endif\nfragData[REFLECTIVITY_INDEX]=reflectivity;\n#endif\n#if SCENE_MRT_COUNT>0\nfragmentOutputs.fragData0=fragData[0];\n#endif\n#if SCENE_MRT_COUNT>1\nfragmentOutputs.fragData1=fragData[1];\n#endif\n#if SCENE_MRT_COUNT>2\nfragmentOutputs.fragData2=fragData[2];\n#endif\n#if SCENE_MRT_COUNT>3\nfragmentOutputs.fragData3=fragData[3];\n#endif\n#if SCENE_MRT_COUNT>4\nfragmentOutputs.fragData4=fragData[4];\n#endif\n#if SCENE_MRT_COUNT>5\nfragmentOutputs.fragData5=fragData[5];\n#endif\n#if SCENE_MRT_COUNT>6\nfragmentOutputs.fragData6=fragData[6];\n#endif\n#if SCENE_MRT_COUNT>7\nfragmentOutputs.fragData7=fragData[7];\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const geometryPixelShaderWGSL = { name, shader };\n"]}
|
|
@@ -22,7 +22,10 @@ const shader = `#include<bonesDeclaration>
|
|
|
22
22
|
#include<instancesDeclaration>
|
|
23
23
|
#include<sceneUboDeclaration>
|
|
24
24
|
#include<clipPlaneVertexDeclaration>
|
|
25
|
-
attribute position: vec3f;
|
|
25
|
+
attribute position: vec3f;
|
|
26
|
+
#ifdef HAS_NORMAL_ATTRIBUTE
|
|
27
|
+
attribute normal: vec3f;
|
|
28
|
+
#endif
|
|
26
29
|
#ifdef NEED_UV
|
|
27
30
|
varying vUV: vec2f;
|
|
28
31
|
#ifdef ALPHATEST
|
|
@@ -64,7 +67,12 @@ uniform previousViewProjection: mat4x4f;varying vCurrentPosition: vec4f;varying
|
|
|
64
67
|
#endif
|
|
65
68
|
#define CUSTOM_VERTEX_DEFINITIONS
|
|
66
69
|
@vertex
|
|
67
|
-
fn main(input : VertexInputs)->FragmentInputs {var positionUpdated: vec3f=input.position;
|
|
70
|
+
fn main(input : VertexInputs)->FragmentInputs {var positionUpdated: vec3f=input.position;
|
|
71
|
+
#ifdef HAS_NORMAL_ATTRIBUTE
|
|
72
|
+
var normalUpdated: vec3f=input.normal;
|
|
73
|
+
#else
|
|
74
|
+
var normalUpdated: vec3f=vec3f(0.0,0.0,0.0);
|
|
75
|
+
#endif
|
|
68
76
|
#ifdef UV1
|
|
69
77
|
var uvUpdated: vec2f=input.uv;
|
|
70
78
|
#endif
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/geometry.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,6CAA6C,CAAC;AACrD,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,6BAA6B,CAAC;AAErC,MAAM,IAAI,GAAG,sBAAsB,CAAC;AACpC,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"geometry.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/geometry.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,6CAA6C,CAAC;AACrD,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,6BAA6B,CAAC;AAErC,MAAM,IAAI,GAAG,sBAAsB,CAAC;AACpC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwKd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/bonesDeclaration\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration\";\nimport \"./ShadersInclude/instancesDeclaration\";\nimport \"./ShadersInclude/sceneUboDeclaration\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal\";\nimport \"./ShadersInclude/morphTargetsVertex\";\nimport \"./ShadersInclude/instancesVertex\";\nimport \"./ShadersInclude/bonesVertex\";\nimport \"./ShadersInclude/bakedVertexAnimation\";\nimport \"./ShadersInclude/clipPlaneVertex\";\nimport \"./ShadersInclude/bumpVertex\";\n\nconst name = \"geometryVertexShader\";\nconst shader = `#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#include<instancesDeclaration>\n#include<sceneUboDeclaration>\n#include<clipPlaneVertexDeclaration>\nattribute position: vec3f;\n#ifdef HAS_NORMAL_ATTRIBUTE\nattribute normal: vec3f;\n#endif\n#ifdef NEED_UV\nvarying vUV: vec2f;\n#ifdef ALPHATEST\nuniform diffuseMatrix: mat4x4f;\n#endif\n#ifdef BUMP\nuniform bumpMatrix: mat4x4f;varying vBumpUV: vec2f;\n#endif\n#ifdef REFLECTIVITY\nuniform reflectivityMatrix: mat4x4f;uniform albedoMatrix: mat4x4f;varying vReflectivityUV: vec2f;varying vAlbedoUV: vec2f;\n#endif\n#ifdef METALLIC_TEXTURE\nvarying vMetallicUV: vec2f;uniform metallicMatrix: mat4x4f;\n#endif\n#ifdef ROUGHNESS_TEXTURE\nvarying vRoughnessUV: vec2f;uniform roughnessMatrix: mat4x4f;\n#endif\n#ifdef UV1\nattribute uv: vec2f;\n#endif\n#ifdef UV2\nattribute uv2: vec2f;\n#endif\n#endif\n#ifdef BUMP\nvarying vWorldView0: vec4f;varying vWorldView1: vec4f;varying vWorldView2: vec4f;varying vWorldView3: vec4f;\n#endif\n#ifdef BUMP\nvarying vNormalW: vec3f;\n#else\nvarying vNormalV: vec3f;\n#endif\nvarying vViewPos: vec4f;\n#if defined(POSITION) || defined(BUMP)\nvarying vPositionW: vec3f;\n#endif\n#if defined(VELOCITY) || defined(VELOCITY_LINEAR)\nuniform previousViewProjection: mat4x4f;varying vCurrentPosition: vec4f;varying vPreviousPosition: vec4f;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {var positionUpdated: vec3f=input.position;\n#ifdef HAS_NORMAL_ATTRIBUTE\nvar normalUpdated: vec3f=input.normal;\n#else\nvar normalUpdated: vec3f=vec3f(0.0,0.0,0.0);\n#endif\n#ifdef UV1\nvar uvUpdated: vec2f=input.uv;\n#endif\n#ifdef UV2\nvar uv2Updated: vec2f=input.uv2;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#include<instancesVertex>\n#if (defined(VELOCITY) || defined(VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=scene.viewProjection*finalWorld*vec4f(positionUpdated,1.0);vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);\n#endif\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvar worldPos: vec4f= vec4f(finalWorld* vec4f(positionUpdated,1.0));\n#ifdef BUMP\nlet vWorldView=scene.view*finalWorld;vertexOutputs.vWorldView0=vWorldView[0];vertexOutputs.vWorldView1=vWorldView[1];vertexOutputs.vWorldView2=vWorldView[2];vertexOutputs.vWorldView3=vWorldView[3];let normalWorld: mat3x3f= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz);vertexOutputs.vNormalW=normalize(normalWorld*normalUpdated);\n#else\n#ifdef NORMAL_WORLDSPACE\nvertexOutputs.vNormalV=normalize((finalWorld* vec4f(normalUpdated,0.0)).xyz);\n#else\nvertexOutputs.vNormalV=normalize(((scene.view*finalWorld)* vec4f(normalUpdated,0.0)).xyz);\n#endif\n#endif\nvertexOutputs.vViewPos=scene.view*worldPos;\n#if (defined(VELOCITY) || defined(VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED)\nvertexOutputs.vCurrentPosition=scene.viewProjection*finalWorld* vec4f(positionUpdated,1.0);\n#if NUM_BONE_INFLUENCERS>0\nvar previousInfluence: mat4x4f;previousInfluence=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];\n#endif\nvertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*previousInfluence* vec4f(positionUpdated,1.0);\n#else\nvertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);\n#endif\n#endif\n#if defined(POSITION) || defined(BUMP)\nvertexOutputs.vPositionW=worldPos.xyz/worldPos.w;\n#endif\nvertexOutputs.position=scene.viewProjection*finalWorld* vec4f(positionUpdated,1.0);\n#include<clipPlaneVertex>\n#ifdef NEED_UV\n#ifdef UV1\n#if defined(ALPHATEST) && defined(ALPHATEST_UV1)\nvertexOutputs.vUV=(uniforms.diffuseMatrix* vec4f(uvUpdated,1.0,0.0)).xy;\n#else\nvertexOutputs.vUV=uvUpdated;\n#endif\n#ifdef BUMP_UV1\nvertexOutputs.vBumpUV=(uniforms.bumpMatrix* vec4f(uvUpdated,1.0,0.0)).xy;\n#endif\n#ifdef REFLECTIVITY_UV1\nvertexOutputs.vReflectivityUV=(uniforms.reflectivityMatrix* vec4f(uvUpdated,1.0,0.0)).xy;\n#else\n#ifdef METALLIC_UV1\nvertexOutputs.vMetallicUV=(uniforms.metallicMatrix* vec4f(uvUpdated,1.0,0.0)).xy;\n#endif\n#ifdef ROUGHNESS_UV1\nvertexOutputs.vRoughnessUV=(uniforms.roughnessMatrix* vec4f(uvUpdated,1.0,0.0)).xy;\n#endif\n#endif\n#ifdef ALBEDO_UV1\nvertexOutputs.vAlbedoUV=(uniforms.albedoMatrix* vec4f(uvUpdated,1.0,0.0)).xy;\n#endif\n#endif\n#ifdef UV2\n#if defined(ALPHATEST) && defined(ALPHATEST_UV2)\nvertexOutputs.vUV=(uniforms.diffuseMatrix* vec4f(uv2Updated,1.0,0.0)).xy;\n#else\nvertexOutputs.vUV=uv2Updated;\n#endif\n#ifdef BUMP_UV2\nvertexOutputs.vBumpUV=(uniforms.bumpMatrix* vec4f(uv2Updated,1.0,0.0)).xy;\n#endif\n#ifdef REFLECTIVITY_UV2\nvertexOutputs.vReflectivityUV=(uniforms.reflectivityMatrix* vec4f(uv2Updated,1.0,0.0)).xy;\n#else\n#ifdef METALLIC_UV2\nvertexOutputs.vMetallicUV=(uniforms.metallicMatrix* vec4f(uv2Updated,1.0,0.0)).xy;\n#endif\n#ifdef ROUGHNESS_UV2\nvertexOutputs.vRoughnessUV=(uniforms.roughnessMatrix* vec4f(uv2Updated,1.0,0.0)).xy;\n#endif\n#endif\n#ifdef ALBEDO_UV2\nvertexOutputs.vAlbedoUV=(uniforms.albedoMatrix* vec4f(uv2Updated,1.0,0.0)).xy;\n#endif\n#endif\n#endif\n#include<bumpVertex>\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const geometryVertexShaderWGSL = { name, shader };\n"]}
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
import { ShaderStore } from "../Engines/shaderStore.js";
|
|
3
3
|
const name = "pickingPixelShader";
|
|
4
4
|
const shader = `#if defined(INSTANCES)
|
|
5
|
-
varying vMeshID:
|
|
5
|
+
varying vMeshID: f32;
|
|
6
6
|
#else
|
|
7
|
-
uniform meshID:
|
|
7
|
+
uniform meshID: f32;
|
|
8
8
|
#endif
|
|
9
9
|
@fragment
|
|
10
|
-
fn main(input: FragmentInputs)->FragmentOutputs {
|
|
10
|
+
fn main(input: FragmentInputs)->FragmentOutputs {var id: i32;
|
|
11
11
|
#if defined(INSTANCES)
|
|
12
|
-
|
|
12
|
+
id=i32(input.vMeshID);
|
|
13
13
|
#else
|
|
14
|
-
|
|
14
|
+
id=i32(uniforms.meshID);
|
|
15
15
|
#endif
|
|
16
|
-
|
|
16
|
+
var color=vec3f(
|
|
17
|
+
f32((id>>16) & 0xFF),
|
|
18
|
+
f32((id>>8) & 0xFF),
|
|
19
|
+
f32(id & 0xFF),
|
|
20
|
+
)/255.0;fragmentOutputs.color=vec4f(color,1.0);}
|
|
21
|
+
`;
|
|
17
22
|
// Sideeffect
|
|
18
23
|
if (!ShaderStore.ShadersStoreWGSL[name]) {
|
|
19
24
|
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picking.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/picking.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"picking.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/picking.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;CAiBd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"pickingPixelShader\";\nconst shader = `#if defined(INSTANCES)\nvarying vMeshID: f32;\n#else\nuniform meshID: f32;\n#endif\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var id: i32;\n#if defined(INSTANCES)\nid=i32(input.vMeshID);\n#else\nid=i32(uniforms.meshID);\n#endif\nvar color=vec3f(\nf32((id>>16) & 0xFF),\nf32((id>>8) & 0xFF),\nf32(id & 0xFF),\n)/255.0;fragmentOutputs.color=vec4f(color,1.0);}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const pickingPixelShaderWGSL = { name, shader };\n"]}
|
|
@@ -13,7 +13,7 @@ import "./ShadersInclude/bakedVertexAnimation.js";
|
|
|
13
13
|
const name = "pickingVertexShader";
|
|
14
14
|
const shader = `attribute position: vec3f;
|
|
15
15
|
#if defined(INSTANCES)
|
|
16
|
-
attribute instanceMeshID:
|
|
16
|
+
attribute instanceMeshID: f32;
|
|
17
17
|
#endif
|
|
18
18
|
#include<bonesDeclaration>
|
|
19
19
|
#include<bakedVertexAnimationDeclaration>
|
|
@@ -22,7 +22,7 @@ attribute instanceMeshID: vec4f;
|
|
|
22
22
|
#include<instancesDeclaration>
|
|
23
23
|
uniform viewProjection: mat4x4f;
|
|
24
24
|
#if defined(INSTANCES)
|
|
25
|
-
varying vMeshID:
|
|
25
|
+
varying vMeshID: f32;
|
|
26
26
|
#endif
|
|
27
27
|
@vertex
|
|
28
28
|
fn main(input : VertexInputs)->FragmentInputs {
|
|
@@ -35,7 +35,8 @@ var worldPos: vec4f=finalWorld*vec4f(input.position,1.0);vertexOutputs.position=
|
|
|
35
35
|
#if defined(INSTANCES)
|
|
36
36
|
vertexOutputs.vMeshID=input.instanceMeshID;
|
|
37
37
|
#endif
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
39
40
|
// Sideeffect
|
|
40
41
|
if (!ShaderStore.ShadersStoreWGSL[name]) {
|
|
41
42
|
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picking.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/picking.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAE/C,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"picking.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/picking.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kDAAkD,CAAC;AAC1D,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AACxD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,8BAA8B,CAAC;AACtC,OAAO,uCAAuC,CAAC;AAE/C,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/bonesDeclaration\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration\";\nimport \"./ShadersInclude/instancesDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal\";\nimport \"./ShadersInclude/morphTargetsVertex\";\nimport \"./ShadersInclude/instancesVertex\";\nimport \"./ShadersInclude/bonesVertex\";\nimport \"./ShadersInclude/bakedVertexAnimation\";\n\nconst name = \"pickingVertexShader\";\nconst shader = `attribute position: vec3f;\n#if defined(INSTANCES)\nattribute instanceMeshID: f32;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#include<instancesDeclaration>\nuniform viewProjection: mat4x4f;\n#if defined(INSTANCES)\nvarying vMeshID: f32;\n#endif\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvar worldPos: vec4f=finalWorld*vec4f(input.position,1.0);vertexOutputs.position=uniforms.viewProjection*worldPos;\n#if defined(INSTANCES)\nvertexOutputs.vMeshID=input.instanceMeshID;\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const pickingVertexShaderWGSL = { name, shader };\n"]}
|
|
@@ -64,7 +64,7 @@ export declare class WebXRAnchorSystem extends WebXRAbstractFeature {
|
|
|
64
64
|
/**
|
|
65
65
|
* The module's name
|
|
66
66
|
*/
|
|
67
|
-
static readonly Name
|
|
67
|
+
static readonly Name: "xr-anchor-system";
|
|
68
68
|
/**
|
|
69
69
|
* The (Babylon) version of this module.
|
|
70
70
|
* This is an integer representing the implementation version.
|
|
@@ -40,7 +40,7 @@ export declare class WebXRBackgroundRemover extends WebXRAbstractFeature {
|
|
|
40
40
|
/**
|
|
41
41
|
* The module's name
|
|
42
42
|
*/
|
|
43
|
-
static readonly Name
|
|
43
|
+
static readonly Name: "xr-background-remover";
|
|
44
44
|
/**
|
|
45
45
|
* The (Babylon) version of this module.
|
|
46
46
|
* This is an integer representing the implementation version.
|
|
@@ -132,7 +132,7 @@ export declare class WebXRControllerMovement extends WebXRAbstractFeature {
|
|
|
132
132
|
/**
|
|
133
133
|
* The module's name
|
|
134
134
|
*/
|
|
135
|
-
static readonly Name
|
|
135
|
+
static readonly Name: "xr-controller-movement";
|
|
136
136
|
/**
|
|
137
137
|
* Standard controller configurations.
|
|
138
138
|
*/
|
|
@@ -91,7 +91,7 @@ export declare class WebXRControllerPhysics extends WebXRAbstractFeature {
|
|
|
91
91
|
/**
|
|
92
92
|
* The module's name
|
|
93
93
|
*/
|
|
94
|
-
static readonly Name
|
|
94
|
+
static readonly Name: "xr-physics-controller";
|
|
95
95
|
/**
|
|
96
96
|
* The (Babylon) version of this module.
|
|
97
97
|
* This is an integer representing the implementation version.
|
|
@@ -121,7 +121,7 @@ export declare class WebXRControllerPointerSelection extends WebXRAbstractFeatur
|
|
|
121
121
|
/**
|
|
122
122
|
* The module's name
|
|
123
123
|
*/
|
|
124
|
-
static readonly Name
|
|
124
|
+
static readonly Name: "xr-controller-pointer-selection";
|
|
125
125
|
/**
|
|
126
126
|
* The (Babylon) version of this module.
|
|
127
127
|
* This is an integer representing the implementation version.
|
|
@@ -156,7 +156,7 @@ export declare class WebXRMotionControllerTeleportation extends WebXRAbstractFea
|
|
|
156
156
|
/**
|
|
157
157
|
* The module's name
|
|
158
158
|
*/
|
|
159
|
-
static readonly Name
|
|
159
|
+
static readonly Name: "xr-controller-teleportation";
|
|
160
160
|
/**
|
|
161
161
|
* The (Babylon) version of this module.
|
|
162
162
|
* This is an integer representing the implementation version.
|
|
@@ -57,7 +57,7 @@ export declare class WebXRDomOverlay extends WebXRAbstractFeature {
|
|
|
57
57
|
/**
|
|
58
58
|
* The module's name
|
|
59
59
|
*/
|
|
60
|
-
static readonly Name
|
|
60
|
+
static readonly Name: "xr-dom-overlay";
|
|
61
61
|
/**
|
|
62
62
|
* The (Babylon) version of this module.
|
|
63
63
|
* This is an integer representing the implementation version.
|
|
@@ -102,7 +102,7 @@ export declare class WebXRDepthSensing extends WebXRAbstractFeature {
|
|
|
102
102
|
/**
|
|
103
103
|
* The module's name
|
|
104
104
|
*/
|
|
105
|
-
static readonly Name
|
|
105
|
+
static readonly Name: "xr-depth-sensing";
|
|
106
106
|
/**
|
|
107
107
|
* The (Babylon) version of this module.
|
|
108
108
|
* This is an integer representing the implementation version.
|
|
@@ -13,7 +13,7 @@ export declare class WebXREyeTracking extends WebXRAbstractFeature {
|
|
|
13
13
|
/**
|
|
14
14
|
* The module's name
|
|
15
15
|
*/
|
|
16
|
-
static readonly Name
|
|
16
|
+
static readonly Name: "xr-eye-tracking";
|
|
17
17
|
/**
|
|
18
18
|
* The (Babylon) version of this module.
|
|
19
19
|
* This is an integer representing the implementation version.
|
|
@@ -27,7 +27,7 @@ export declare class WebXRFeaturePointSystem extends WebXRAbstractFeature {
|
|
|
27
27
|
/**
|
|
28
28
|
* The module's name
|
|
29
29
|
*/
|
|
30
|
-
static readonly Name
|
|
30
|
+
static readonly Name: "xr-feature-points";
|
|
31
31
|
/**
|
|
32
32
|
* The (Babylon) version of this module.
|
|
33
33
|
* This is an integer representing the implementation version.
|
|
@@ -298,7 +298,7 @@ export declare class WebXRHandTracking extends WebXRAbstractFeature {
|
|
|
298
298
|
/**
|
|
299
299
|
* The module's name
|
|
300
300
|
*/
|
|
301
|
-
static readonly Name
|
|
301
|
+
static readonly Name: "xr-hand-tracking";
|
|
302
302
|
/**
|
|
303
303
|
* The (Babylon) version of this module.
|
|
304
304
|
* This is an integer representing the implementation version.
|
|
@@ -83,7 +83,7 @@ export declare class WebXRHitTest extends WebXRAbstractFeature implements IWebXR
|
|
|
83
83
|
/**
|
|
84
84
|
* The module's name
|
|
85
85
|
*/
|
|
86
|
-
static readonly Name
|
|
86
|
+
static readonly Name: "xr-hit-test";
|
|
87
87
|
/**
|
|
88
88
|
* The (Babylon) version of this module.
|
|
89
89
|
* This is an integer representing the implementation version.
|
|
@@ -56,7 +56,7 @@ export declare class WebXRHitTestLegacy extends WebXRAbstractFeature implements
|
|
|
56
56
|
/**
|
|
57
57
|
* The module's name
|
|
58
58
|
*/
|
|
59
|
-
static readonly Name
|
|
59
|
+
static readonly Name: "xr-hit-test";
|
|
60
60
|
/**
|
|
61
61
|
* The (Babylon) version of this module.
|
|
62
62
|
* This is an integer representing the implementation version.
|
|
@@ -66,7 +66,7 @@ export declare class WebXRImageTracking extends WebXRAbstractFeature {
|
|
|
66
66
|
/**
|
|
67
67
|
* The module's name
|
|
68
68
|
*/
|
|
69
|
-
static readonly Name
|
|
69
|
+
static readonly Name: "xr-image-tracking";
|
|
70
70
|
/**
|
|
71
71
|
* The (Babylon) version of this module.
|
|
72
72
|
* This is an integer representing the implementation version.
|
|
@@ -28,7 +28,7 @@ export declare class WebXRLayers extends WebXRAbstractFeature {
|
|
|
28
28
|
/**
|
|
29
29
|
* The module's name
|
|
30
30
|
*/
|
|
31
|
-
static readonly Name
|
|
31
|
+
static readonly Name: "xr-layers";
|
|
32
32
|
/**
|
|
33
33
|
* The (Babylon) version of this module.
|
|
34
34
|
* This is an integer representing the implementation version.
|
|
@@ -98,7 +98,7 @@ export declare class WebXRLightEstimation extends WebXRAbstractFeature {
|
|
|
98
98
|
/**
|
|
99
99
|
* The module's name
|
|
100
100
|
*/
|
|
101
|
-
static readonly Name
|
|
101
|
+
static readonly Name: "xr-light-estimation";
|
|
102
102
|
/**
|
|
103
103
|
* The (Babylon) version of this module.
|
|
104
104
|
* This is an integer representing the implementation version.
|
|
@@ -90,7 +90,7 @@ export declare class WebXRMeshDetector extends WebXRAbstractFeature {
|
|
|
90
90
|
/**
|
|
91
91
|
* The module's name
|
|
92
92
|
*/
|
|
93
|
-
static readonly Name
|
|
93
|
+
static readonly Name: "xr-mesh-detection";
|
|
94
94
|
/**
|
|
95
95
|
* The (Babylon) version of this module.
|
|
96
96
|
* This is an integer representing the implementation version.
|
|
@@ -92,7 +92,7 @@ export declare class WebXRNearInteraction extends WebXRAbstractFeature {
|
|
|
92
92
|
/**
|
|
93
93
|
* The module's name
|
|
94
94
|
*/
|
|
95
|
-
static readonly Name
|
|
95
|
+
static readonly Name: "xr-near-interaction";
|
|
96
96
|
/**
|
|
97
97
|
* The (Babylon) version of this module.
|
|
98
98
|
* This is an integer representing the implementation version.
|
|
@@ -58,7 +58,7 @@ export declare class WebXRPlaneDetector extends WebXRAbstractFeature {
|
|
|
58
58
|
/**
|
|
59
59
|
* The module's name
|
|
60
60
|
*/
|
|
61
|
-
static readonly Name
|
|
61
|
+
static readonly Name: "xr-plane-detection";
|
|
62
62
|
/**
|
|
63
63
|
* The (Babylon) version of this module.
|
|
64
64
|
* This is an integer representing the implementation version.
|
|
@@ -53,7 +53,7 @@ export declare class WebXRRawCameraAccess extends WebXRAbstractFeature {
|
|
|
53
53
|
/**
|
|
54
54
|
* The module's name
|
|
55
55
|
*/
|
|
56
|
-
static readonly Name
|
|
56
|
+
static readonly Name: "xr-raw-camera-access";
|
|
57
57
|
/**
|
|
58
58
|
* The (Babylon) version of this module.
|
|
59
59
|
* This is an integer representing the implementation version.
|
|
@@ -77,7 +77,7 @@ export declare class WebXRSpaceWarp extends WebXRAbstractFeature {
|
|
|
77
77
|
/**
|
|
78
78
|
* The module's name
|
|
79
79
|
*/
|
|
80
|
-
static readonly Name
|
|
80
|
+
static readonly Name: "xr-space-warp";
|
|
81
81
|
/**
|
|
82
82
|
* The (Babylon) version of this module.
|
|
83
83
|
* This is an integer representing the implementation version.
|
|
@@ -67,7 +67,7 @@ export class WebXRDefaultExperience {
|
|
|
67
67
|
xrInput: result.input,
|
|
68
68
|
renderingGroupId: options.renderingGroupId,
|
|
69
69
|
};
|
|
70
|
-
result.pointerSelection =
|
|
70
|
+
result.pointerSelection = result.baseExperience.featuresManager.enableFeature(WebXRControllerPointerSelection.Name, options.useStablePlugins ? "stable" : "latest", pointerSelectionOptions);
|
|
71
71
|
if (!options.disableTeleportation) {
|
|
72
72
|
// Add default teleportation, including rotation
|
|
73
73
|
result.teleportation = result.baseExperience.featuresManager.enableFeature(WebXRMotionControllerTeleportation.Name, options.useStablePlugins ? "stable" : "latest", {
|