@vived/component-abb-6700 1.0.0
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/.todo.md +13 -0
- package/README.md +122 -0
- package/dist/.gitkeep +0 -0
- package/dist/Adapters/aBB6700PMAdapter.d.ts +10 -0
- package/dist/Adapters/aBB6700PMAdapter.d.ts.map +1 -0
- package/dist/Controllers/createABB6700.d.ts +12 -0
- package/dist/Controllers/createABB6700.d.ts.map +1 -0
- package/dist/Controllers/getPose.d.ts +11 -0
- package/dist/Controllers/getPose.d.ts.map +1 -0
- package/dist/Controllers/setJointAngle.d.ts +12 -0
- package/dist/Controllers/setJointAngle.d.ts.map +1 -0
- package/dist/Controllers/setPose.d.ts +11 -0
- package/dist/Controllers/setPose.d.ts.map +1 -0
- package/dist/Entities/ABB6700Entity.d.ts +35 -0
- package/dist/Entities/ABB6700Entity.d.ts.map +1 -0
- package/dist/Entities/ABB6700Repo.d.ts +32 -0
- package/dist/Entities/ABB6700Repo.d.ts.map +1 -0
- package/dist/Factory/ABB6700FeatureFactory.d.ts +26 -0
- package/dist/Factory/ABB6700FeatureFactory.d.ts.map +1 -0
- package/dist/Mocks/MockABB6700PM.d.ts +11 -0
- package/dist/Mocks/MockABB6700PM.d.ts.map +1 -0
- package/dist/Mocks/MockSetJointAngleUC.d.ts +7 -0
- package/dist/Mocks/MockSetJointAngleUC.d.ts.map +1 -0
- package/dist/Mocks/MockSetPoseUC.d.ts +7 -0
- package/dist/Mocks/MockSetPoseUC.d.ts.map +1 -0
- package/dist/PMs/ABB6700PM.d.ts +32 -0
- package/dist/PMs/ABB6700PM.d.ts.map +1 -0
- package/dist/UCs/CalcStabilizerUC.d.ts +7 -0
- package/dist/UCs/CalcStabilizerUC.d.ts.map +1 -0
- package/dist/UCs/SetJointAngleUC.d.ts +15 -0
- package/dist/UCs/SetJointAngleUC.d.ts.map +1 -0
- package/dist/UCs/SetPoseUC.d.ts +22 -0
- package/dist/UCs/SetPoseUC.d.ts.map +1 -0
- package/dist/Views/ABB6700BabylonView.d.ts +27 -0
- package/dist/Views/ABB6700BabylonView.d.ts.map +1 -0
- package/dist/abb_6700.glb +0 -0
- package/dist/abstractAudioBus-CyBWsmuN.js +14 -0
- package/dist/animationGroup-BhNThqQe.js +1454 -0
- package/dist/basisTextureLoader-BT391BsV.js +310 -0
- package/dist/brdfTextureTools-DUyKBAXf.js +79 -0
- package/dist/bumpFragment-Dd-ojPA1.js +134 -0
- package/dist/bumpFragment-KE1_PuMl.js +287 -0
- package/dist/bumpVertex-BcdvVFVx.js +8 -0
- package/dist/bumpVertexDeclaration-B5Uvs-RS.js +8 -0
- package/dist/bumpVertexDeclaration-ixSg-yGI.js +8 -0
- package/dist/clipPlaneFragment-DJwQynjA.js +136 -0
- package/dist/clipPlaneVertex-D4Wk50XG.js +376 -0
- package/dist/clipPlaneVertex-eQ147Tn2.js +350 -0
- package/dist/component.config.d.ts +17 -0
- package/dist/component.config.d.ts.map +1 -0
- package/dist/ddsTextureLoader-DeoF3iGO.js +331 -0
- package/dist/default.fragment-DKnTR9nY.js +548 -0
- package/dist/default.fragment-rIGWrUS5.js +486 -0
- package/dist/default.vertex-Bt5y1VyA.js +212 -0
- package/dist/default.vertex-Dext1liJ.js +224 -0
- package/dist/defaultUboDeclaration-BwslQZX8.js +11 -0
- package/dist/defaultUboDeclaration-DSXACgip.js +9 -0
- package/dist/easing-BAt0SO-B.js +163 -0
- package/dist/envTextureLoader-CBiW_Q-U.js +40 -0
- package/dist/exrTextureLoader-5SC6PKIA.js +740 -0
- package/dist/flowGraphApplyForceBlock-6e8-wcaw.js +32 -0
- package/dist/flowGraphApplyImpulseBlock-B27EZQow.js +32 -0
- package/dist/flowGraphArrayIndexBlock-DIUn5e4i.js +31 -0
- package/dist/flowGraphBezierCurveEasingBlock-BJmiHk40.js +25 -0
- package/dist/flowGraphBinaryOperationBlock-Bj7TANCc.js +25 -0
- package/dist/flowGraphBranchBlock-7CRvIKWc.js +19 -0
- package/dist/flowGraphCachedOperationBlock-CP1ZiuIB.js +26 -0
- package/dist/flowGraphCancelDelayBlock-DqtgzBGm.js +20 -0
- package/dist/flowGraphCodeExecutionBlock-CaYXCGqo.js +23 -0
- package/dist/flowGraphConditionalDataBlock-DJ7evX8_.js +28 -0
- package/dist/flowGraphConsoleLogBlock-cMkpqLzO.js +68 -0
- package/dist/flowGraphConstantBlock-JWybwT0A.js +28 -0
- package/dist/flowGraphContextBlock-CFDXHcbn.js +19 -0
- package/dist/flowGraphCounterBlock-B0uPkgw9.js +24 -0
- package/dist/flowGraphDataSwitchBlock-B0GSifvJ.js +27 -0
- package/dist/flowGraphDebounceBlock-CSw8zKym.js +24 -0
- package/dist/flowGraphDebugBlock-DiSR6Ahn.js +65 -0
- package/dist/flowGraphDoNBlock-C-48oQ2H.js +24 -0
- package/dist/flowGraphEasingBlock-DKUaE7Rp.js +50 -0
- package/dist/flowGraphFlipFlopBlock-DX5BGhMV.js +20 -0
- package/dist/flowGraphForLoopBlock-Di-Qwg23.js +27 -0
- package/dist/flowGraphFunctionReferenceBlock-D8X5TFsO.js +20 -0
- package/dist/flowGraphGLTFDataProvider-C4j7nPQv.js +16 -0
- package/dist/flowGraphGetAngularVelocityBlock-Cq-yTQ4D.js +31 -0
- package/dist/flowGraphGetAssetBlock-B36eioor.js +21 -0
- package/dist/flowGraphGetLinearVelocityBlock-MdrV0eUD.js +31 -0
- package/dist/flowGraphGetPhysicsMassPropertiesBlock-wXDZP1wM.js +30 -0
- package/dist/flowGraphGetPropertyBlock-eP0badwf.js +46 -0
- package/dist/flowGraphGetSoundVolumeBlock-D3gXGHXa.js +29 -0
- package/dist/flowGraphGetVariableBlock-C7-qZAec.js +31 -0
- package/dist/flowGraphIndexOfBlock-CC5l9n9P.js +31 -0
- package/dist/flowGraphInterpolationBlock-B6922jzt.js +50 -0
- package/dist/flowGraphIsKeyPressedBlock-X_iuiUOX.js +31 -0
- package/dist/flowGraphIsSoundPlayingBlock-DONQX8N8.js +29 -0
- package/dist/flowGraphJsonPointerParserBlock-DBH_gN8I.js +95 -0
- package/dist/flowGraphKeyDownEventBlock-D5T1Uyfv.js +26 -0
- package/dist/flowGraphKeyUpEventBlock-BPY_Kgkm.js +21 -0
- package/dist/flowGraphKeyboardEventBlock-C49fx3TC.js +20 -0
- package/dist/flowGraphMathBlocks-CkvrN3VJ.js +864 -0
- package/dist/flowGraphMathCombineExtractBlocks-QSjGlnoz.js +248 -0
- package/dist/flowGraphMatrixMathBlocks-B3D7Cz9p.js +117 -0
- package/dist/flowGraphMeshPickEventBlock-BBTz-taa.js +35 -0
- package/dist/flowGraphMultiGateBlock-BhY1y5BG.js +50 -0
- package/dist/flowGraphPauseAnimationBlock-CHZZXMbg.js +19 -0
- package/dist/flowGraphPauseSoundBlock-B7hMmJ0c.js +31 -0
- package/dist/flowGraphPhysicsCollisionEventBlock-CxoPpT-q.js +56 -0
- package/dist/flowGraphPlayAnimationBlock-DVAvIFux.js +99 -0
- package/dist/flowGraphPlaySoundBlock-DjHGrqbC.js +32 -0
- package/dist/flowGraphPointerDownEventBlock-qI-H0JST.js +31 -0
- package/dist/flowGraphPointerMoveEventBlock-DAi4VUyy.js +31 -0
- package/dist/flowGraphPointerOutEventBlock-CFtj68aC.js +21 -0
- package/dist/flowGraphPointerOverEventBlock-VxdHhFuu.js +23 -0
- package/dist/flowGraphPointerUpEventBlock-DRR1f07q.js +31 -0
- package/dist/flowGraphReceiveCustomEventBlock-B3bwdB66.js +52 -0
- package/dist/flowGraphSceneReadyEventBlock-Dy6lDT3j.js +23 -0
- package/dist/flowGraphSceneTickEventBlock-Bl9BF_Xw.js +32 -0
- package/dist/flowGraphSendCustomEventBlock-BAR4PGFq.js +35 -0
- package/dist/flowGraphSequenceBlock-veqU32ZZ.js +32 -0
- package/dist/flowGraphSetAngularVelocityBlock-Dj9b-zu6.js +31 -0
- package/dist/flowGraphSetDelayBlock-CMjudtvk.js +131 -0
- package/dist/flowGraphSetLinearVelocityBlock-DVDhhJBd.js +31 -0
- package/dist/flowGraphSetPhysicsMotionTypeBlock-CL3cxNCO.js +36 -0
- package/dist/flowGraphSetPropertyBlock-D3sWL3Ss.js +47 -0
- package/dist/flowGraphSetSoundVolumeBlock-CxVk45yR.js +32 -0
- package/dist/flowGraphSetVariableBlock-D1oJiwLj.js +47 -0
- package/dist/flowGraphSoundEndedEventBlock-CubEwii0.js +47 -0
- package/dist/flowGraphStopAnimationBlock-B9inwIQx.js +48 -0
- package/dist/flowGraphStopSoundBlock-BijIX2jC.js +31 -0
- package/dist/flowGraphSwitchBlock-BMhPb4OX.js +54 -0
- package/dist/flowGraphThrottleBlock-C7vrnkb1.js +37 -0
- package/dist/flowGraphTransformCoordinatesSystemBlock-DoISqaUG.js +29 -0
- package/dist/flowGraphTypeToTypeBlocks-CSML6QWx.js +57 -0
- package/dist/flowGraphUnaryOperationBlock-B0Shf-lJ.js +24 -0
- package/dist/flowGraphVectorMathBlocks-DoTRR_E0.js +178 -0
- package/dist/flowGraphWaitAllBlock-BvmDMc24.js +54 -0
- package/dist/flowGraphWhileLoopBlock-BaIq4-K2.js +27 -0
- package/dist/geometry.fragment-Bsis3UG2.js +275 -0
- package/dist/geometry.vertex-DskQ5b8j.js +222 -0
- package/dist/harmonicsFunctions-CtNrRfir.js +193 -0
- package/dist/harmonicsFunctions-PEz6APC7.js +18 -0
- package/dist/hdrTextureLoader-D9rYxJ9q.js +112 -0
- package/dist/helperFunctions-Bt7Zfkrp.js +89 -0
- package/dist/helperFunctions-CPmRxd37.js +121 -0
- package/dist/iesTextureLoader-BGUFjVhI.js +93 -0
- package/dist/index-CS3Icp_r.js +67657 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/ktxTextureLoader-cUaGg9_L.js +459 -0
- package/dist/lightFragment-BRDibDKG.js +404 -0
- package/dist/lightFragment-DCqtGMp_.js +402 -0
- package/dist/logDepthDeclaration-Bwm-3KyB.js +16 -0
- package/dist/logDepthDeclaration-gUfeSnXX.js +20 -0
- package/dist/logDepthVertex-CKeuJ6ae.js +213 -0
- package/dist/logDepthVertex-CXkmZels.js +459 -0
- package/dist/mesh.vertexData.functions-Bc9lJlrU.js +74 -0
- package/dist/oitFragment-B8zuQigp.js +792 -0
- package/dist/oitFragment-DH3h3T6x.js +657 -0
- package/dist/openpbr.fragment-BglYS6LA.js +1405 -0
- package/dist/openpbr.fragment-DrOTZs4m.js +1553 -0
- package/dist/openpbr.vertex-B-PaLFOR.js +384 -0
- package/dist/openpbr.vertex-DMdFRTnX.js +268 -0
- package/dist/openpbrMaterial-HCU0aOca.js +2880 -0
- package/dist/openpbrMaterialLoadingAdapter-CWRAa-7S.js +1122 -0
- package/dist/openpbrTransmissionLayerData-CfDVObj5.js +352 -0
- package/dist/openpbrUboDeclaration-CA2pvSbt.js +9 -0
- package/dist/openpbrUboDeclaration-xU8VOaib.js +10 -0
- package/dist/pass.fragment-1mMP54bb.js +10 -0
- package/dist/pass.fragment-DzaUp_jk.js +10 -0
- package/dist/passCube.fragment-CQaXS7g3.js +29 -0
- package/dist/passCube.fragment-QJGPwAXI.js +29 -0
- package/dist/pbr.fragment-BnaAAGxb.js +2775 -0
- package/dist/pbr.fragment-CYZk_EGU.js +2619 -0
- package/dist/pbr.vertex-CyvdCw91.js +372 -0
- package/dist/pbr.vertex-DJMAkDxs.js +270 -0
- package/dist/pbrBRDFFunctions-EugoWm6O.js +175 -0
- package/dist/pbrDebug-Bk3sPoEG.js +719 -0
- package/dist/pbrDebug-Cdalzb1I.js +614 -0
- package/dist/pbrIBLFunctions-B0bVAXCF.js +47 -0
- package/dist/pbrIBLFunctions-C06z-ouZ.js +51 -0
- package/dist/pbrMaterial-C4FCKBZQ.js +1660 -0
- package/dist/pbrMaterialLoadingAdapter-BGHlS_ZN.js +1032 -0
- package/dist/pbrUboDeclaration-1lN5_-Bw.js +9 -0
- package/dist/pbrUboDeclaration-BJOUUOZ2.js +10 -0
- package/dist/procedural.vertex-CFPKczKj.js +14 -0
- package/dist/procedural.vertex-DUW7bYZt.js +13 -0
- package/dist/rgbdDecode.fragment-CEGgE4tL.js +8 -0
- package/dist/rgbdDecode.fragment-FT0wkgah.js +8 -0
- package/dist/rgbdEncode.fragment-CLnJJf6E.js +8 -0
- package/dist/rgbdEncode.fragment-CaAcMsY9.js +8 -0
- package/dist/sceneUboDeclaration-B6oxsfcj.js +8 -0
- package/dist/sceneUboDeclaration-JByfVKik.js +13 -0
- package/dist/setupABB6700InstanceFactory.d.ts +7 -0
- package/dist/setupABB6700InstanceFactory.d.ts.map +1 -0
- package/dist/studio.env +0 -0
- package/dist/textureProcessor.fragment-BYPw6SMQ.js +152 -0
- package/dist/textureProcessor.fragment-Ciw9-F3w.js +157 -0
- package/dist/textureTools-Cct_bGgp.js +40 -0
- package/dist/tgaTextureLoader-BJOIdnFr.js +198 -0
- package/dist/thinEngine-Bt9FW4dD.js +2425 -0
- package/dist/webAudioBus-BUzRHSxr.js +88 -0
- package/dist/webAudioMainBus-Dds1TgJG.js +49 -0
- package/package.json +49 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { b0 as e } from "./index-CS3Icp_r.js";
|
|
2
|
+
const r = "openpbrDielectricReflectance", a = `struct ReflectanceParams
|
|
3
|
+
{F0: f32,
|
|
4
|
+
F90: f32,
|
|
5
|
+
coloredF0: vec3f,
|
|
6
|
+
coloredF90: vec3f,};
|
|
7
|
+
#define pbr_inline
|
|
8
|
+
fn dielectricReflectance(
|
|
9
|
+
insideIOR: f32,outsideIOR: f32,specularColor: vec3f,specularWeight: f32
|
|
10
|
+
)->ReflectanceParams
|
|
11
|
+
{var outParams: ReflectanceParams;let dielectricF0=pow((insideIOR-outsideIOR)/(insideIOR+outsideIOR),2.0);
|
|
12
|
+
#if DIELECTRIC_SPECULAR_MODEL==DIELECTRIC_SPECULAR_MODEL_GLTF
|
|
13
|
+
let maxF0=max(specularColor.r,max(specularColor.g,specularColor.b));outParams.F0=dielectricF0*maxF0*specularWeight;
|
|
14
|
+
#else
|
|
15
|
+
outParams.F0=dielectricF0*specularWeight;
|
|
16
|
+
#endif
|
|
17
|
+
let f90Scale=clamp(2.0f*abs(insideIOR-outsideIOR),0.0f,1.0f);outParams.F90=f90Scale*specularWeight;outParams.coloredF0=vec3f(dielectricF0*specularWeight)*specularColor.rgb;
|
|
18
|
+
#if (DIELECTRIC_SPECULAR_MODEL==DIELECTRIC_SPECULAR_MODEL_OPENPBR)
|
|
19
|
+
let dielectricColorF90: vec3f=specularColor.rgb*vec3f(f90Scale)*specularWeight;
|
|
20
|
+
#else
|
|
21
|
+
let dielectricColorF90: vec3f=vec3f(f90Scale)*specularWeight;
|
|
22
|
+
#endif
|
|
23
|
+
outParams.coloredF90=dielectricColorF90;return outParams;}
|
|
24
|
+
`;
|
|
25
|
+
e.IncludesShadersStoreWGSL[r] || (e.IncludesShadersStoreWGSL[r] = a);
|
|
26
|
+
const n = "openpbrGeometryInfo", t = `struct geometryInfoOutParams
|
|
27
|
+
{NdotV: f32,
|
|
28
|
+
NdotVUnclamped: f32,
|
|
29
|
+
environmentBrdf: vec3f,
|
|
30
|
+
horizonOcclusion: f32};struct geometryInfoAnisoOutParams
|
|
31
|
+
{NdotV: f32,
|
|
32
|
+
NdotVUnclamped: f32,
|
|
33
|
+
environmentBrdf: vec3f,
|
|
34
|
+
horizonOcclusion: f32,
|
|
35
|
+
anisotropy: f32,
|
|
36
|
+
anisotropicTangent: vec3f,
|
|
37
|
+
anisotropicBitangent: vec3f,
|
|
38
|
+
TBN: mat3x3<f32>};fn geometryInfo(
|
|
39
|
+
normalW: vec3f,viewDirectionW: vec3f,roughness: f32,geometricNormalW: vec3f
|
|
40
|
+
)->geometryInfoOutParams
|
|
41
|
+
{var outParams: geometryInfoOutParams;outParams.NdotVUnclamped=dot(normalW,viewDirectionW);outParams.NdotV=absEps(outParams.NdotVUnclamped);
|
|
42
|
+
#if defined(ENVIRONMENTBRDF)
|
|
43
|
+
outParams.environmentBrdf=getBRDFLookup(outParams.NdotV,roughness);
|
|
44
|
+
#else
|
|
45
|
+
outParams.environmentBrdf=vec3f(0.0);
|
|
46
|
+
#endif
|
|
47
|
+
outParams.horizonOcclusion=1.0f;
|
|
48
|
+
#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)
|
|
49
|
+
#ifdef HORIZONOCCLUSION
|
|
50
|
+
#if defined(GEOMETRY_NORMAL) || defined(GEOMETRY_COAT_NORMAL)
|
|
51
|
+
#ifdef REFLECTIONMAP_3D
|
|
52
|
+
outParams.horizonOcclusion=environmentHorizonOcclusion(-viewDirectionW,normalW,geometricNormalW);
|
|
53
|
+
#endif
|
|
54
|
+
#endif
|
|
55
|
+
#endif
|
|
56
|
+
#endif
|
|
57
|
+
return outParams;}
|
|
58
|
+
fn geometryInfoAniso(
|
|
59
|
+
normalW: vec3f,viewDirectionW: vec3f,roughness: f32,geometricNormalW: vec3f
|
|
60
|
+
,vAnisotropy: vec3f,TBN: mat3x3<f32>
|
|
61
|
+
)->geometryInfoAnisoOutParams
|
|
62
|
+
{let geoInfo: geometryInfoOutParams=geometryInfo(normalW,viewDirectionW,roughness,geometricNormalW);var outParams: geometryInfoAnisoOutParams;outParams.NdotV=geoInfo.NdotV;outParams.NdotVUnclamped=geoInfo.NdotVUnclamped;outParams.environmentBrdf=geoInfo.environmentBrdf;outParams.horizonOcclusion=geoInfo.horizonOcclusion;outParams.anisotropy=vAnisotropy.b;let anisotropyDirection: vec3f=vec3f(vAnisotropy.xy,0.);let anisoTBN: mat3x3<f32>=mat3x3<f32>(normalize(TBN[0]),normalize(TBN[1]),normalize(TBN[2]));outParams.anisotropicTangent=normalize(anisoTBN*anisotropyDirection);outParams.anisotropicBitangent=normalize(cross(anisoTBN[2],outParams.anisotropicTangent));outParams.TBN=TBN;return outParams;}
|
|
63
|
+
`;
|
|
64
|
+
e.IncludesShadersStoreWGSL[n] || (e.IncludesShadersStoreWGSL[n] = t);
|
|
65
|
+
const i = "openpbrIblFunctions", c = `#ifdef REFLECTION
|
|
66
|
+
fn sampleIrradiance(
|
|
67
|
+
surfaceNormal: vec3f
|
|
68
|
+
#if defined(NORMAL) && defined(USESPHERICALINVERTEX)
|
|
69
|
+
,vEnvironmentIrradianceSH: vec3f
|
|
70
|
+
#endif
|
|
71
|
+
#if (defined(USESPHERICALFROMREFLECTIONMAP) && (!defined(NORMAL) || !defined(USESPHERICALINVERTEX))) || (defined(USEIRRADIANCEMAP) && defined(REFLECTIONMAP_3D))
|
|
72
|
+
,iblMatrix: mat4x4f
|
|
73
|
+
#endif
|
|
74
|
+
#ifdef USEIRRADIANCEMAP
|
|
75
|
+
#ifdef REFLECTIONMAP_3D
|
|
76
|
+
,irradianceSampler: texture_cube<f32>
|
|
77
|
+
,irradianceSamplerSampler: sampler
|
|
78
|
+
#else
|
|
79
|
+
,irradianceSampler: texture_2d<f32>
|
|
80
|
+
,irradianceSamplerSampler: sampler
|
|
81
|
+
#endif
|
|
82
|
+
#ifdef USE_IRRADIANCE_DOMINANT_DIRECTION
|
|
83
|
+
,reflectionDominantDirection: vec3f
|
|
84
|
+
#endif
|
|
85
|
+
#endif
|
|
86
|
+
#ifdef REALTIME_FILTERING
|
|
87
|
+
,reflectionFilteringInfo: vec2f
|
|
88
|
+
#ifdef IBL_CDF_FILTERING
|
|
89
|
+
,icdfSampler: texture_2d<f32>
|
|
90
|
+
,icdfSamplerSampler: sampler
|
|
91
|
+
#endif
|
|
92
|
+
#endif
|
|
93
|
+
,reflectionInfos: vec2f
|
|
94
|
+
,viewDirectionW: vec3f
|
|
95
|
+
,diffuseRoughness: f32
|
|
96
|
+
,surfaceAlbedo: vec3f
|
|
97
|
+
)->vec3f {var environmentIrradiance=vec3f(0.,0.,0.);
|
|
98
|
+
#if (defined(USESPHERICALFROMREFLECTIONMAP) && (!defined(NORMAL) || !defined(USESPHERICALINVERTEX))) || (defined(USEIRRADIANCEMAP) && defined(REFLECTIONMAP_3D))
|
|
99
|
+
var irradianceVector=(iblMatrix*vec4f(surfaceNormal,0.0f)).xyz;var irradianceView=(iblMatrix*vec4f(viewDirectionW,0.0f)).xyz;
|
|
100
|
+
#if !defined(USE_IRRADIANCE_DOMINANT_DIRECTION) && !defined(REALTIME_FILTERING)
|
|
101
|
+
#if BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LAMBERT && BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LEGACY
|
|
102
|
+
{let NdotV=max(dot(surfaceNormal,viewDirectionW),0.0f);irradianceVector=mix(irradianceVector,irradianceView,(0.5f*(1.0f-NdotV))*diffuseRoughness);}
|
|
103
|
+
#endif
|
|
104
|
+
#endif
|
|
105
|
+
#ifdef REFLECTIONMAP_OPPOSITEZ
|
|
106
|
+
irradianceVector.z*=-1.0;irradianceView.z*=-1.0;
|
|
107
|
+
#endif
|
|
108
|
+
#ifdef INVERTCUBICMAP
|
|
109
|
+
irradianceVector.y*=-1.0;irradianceView.y*=-1.0;
|
|
110
|
+
#endif
|
|
111
|
+
#endif
|
|
112
|
+
#ifdef USESPHERICALFROMREFLECTIONMAP
|
|
113
|
+
#if defined(NORMAL) && defined(USESPHERICALINVERTEX)
|
|
114
|
+
environmentIrradiance=vEnvironmentIrradianceSH;
|
|
115
|
+
#else
|
|
116
|
+
#if defined(REALTIME_FILTERING)
|
|
117
|
+
environmentIrradiance=irradiance(reflectionSampler,reflectionSamplerSampler,irradianceVector,reflectionFilteringInfo,diffuseRoughness,surfaceAlbedo,irradianceView
|
|
118
|
+
#ifdef IBL_CDF_FILTERING
|
|
119
|
+
,icdfSampler
|
|
120
|
+
,icdfSamplerSampler
|
|
121
|
+
#endif
|
|
122
|
+
);
|
|
123
|
+
#else
|
|
124
|
+
environmentIrradiance=computeEnvironmentIrradiance(irradianceVector);
|
|
125
|
+
#endif
|
|
126
|
+
#endif
|
|
127
|
+
#elif defined(USEIRRADIANCEMAP)
|
|
128
|
+
#ifdef REFLECTIONMAP_3D
|
|
129
|
+
let environmentIrradianceFromTexture: vec4f=textureSample(irradianceSampler,irradianceSamplerSampler,irradianceVector);
|
|
130
|
+
#else
|
|
131
|
+
let environmentIrradianceFromTexture: vec4f=textureSample(irradianceSampler,irradianceSamplerSampler,reflectionCoords);
|
|
132
|
+
#endif
|
|
133
|
+
environmentIrradiance=environmentIrradianceFromTexture.rgb;
|
|
134
|
+
#ifdef RGBDREFLECTION
|
|
135
|
+
environmentIrradiance.rgb=fromRGBD(environmentIrradianceFromTexture);
|
|
136
|
+
#endif
|
|
137
|
+
#ifdef GAMMAREFLECTION
|
|
138
|
+
environmentIrradiance.rgb=toLinearSpaceVec3(environmentIrradiance.rgb);
|
|
139
|
+
#endif
|
|
140
|
+
#ifdef USE_IRRADIANCE_DOMINANT_DIRECTION
|
|
141
|
+
let Ls: vec3f=normalize(reflectionDominantDirection);let NoL: f32=dot(irradianceVector,Ls);let NoV: f32=dot(irradianceVector,irradianceView);var diffuseRoughnessTerm=vec3f(1.0f);
|
|
142
|
+
#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON
|
|
143
|
+
let LoV: f32=dot (Ls,irradianceView);let mag: f32=length(reflectionDominantDirection)*2.0f;let clampedAlbedo: vec3f=clamp(surfaceAlbedo,vec3f(0.1f),vec3f(1.0f));diffuseRoughnessTerm=diffuseBRDF_EON(clampedAlbedo,diffuseRoughness,NoL,NoV,LoV)*PI;diffuseRoughnessTerm=diffuseRoughnessTerm/clampedAlbedo;diffuseRoughnessTerm=mix(vec3f(1.0f),diffuseRoughnessTerm,sqrt(clamp(mag*NoV,0.0f,1.0f)));
|
|
144
|
+
#elif BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_BURLEY
|
|
145
|
+
let H: vec3f=(irradianceView+Ls)*0.5f;let VoH: f32=dot(irradianceView,H);diffuseRoughnessTerm=vec3f(diffuseBRDF_Burley(NoL,NoV,VoH,diffuseRoughness)*PI);
|
|
146
|
+
#endif
|
|
147
|
+
environmentIrradiance=environmentIrradiance.rgb*diffuseRoughnessTerm;
|
|
148
|
+
#endif
|
|
149
|
+
#endif
|
|
150
|
+
environmentIrradiance*=reflectionInfos.x;return environmentIrradiance;}
|
|
151
|
+
#ifdef REFLECTIONMAP_3D
|
|
152
|
+
fn createReflectionCoords(vPositionW: vec3f,normalW: vec3f)->vec3f
|
|
153
|
+
#else
|
|
154
|
+
fn createReflectionCoords(vPositionW: vec3f,normalW: vec3f)->vec2f
|
|
155
|
+
#endif
|
|
156
|
+
{var reflectionVector: vec3f=computeReflectionCoords(vec4f(vPositionW,1.0f),normalW);
|
|
157
|
+
#ifdef REFLECTIONMAP_OPPOSITEZ
|
|
158
|
+
reflectionVector.z*=-1.0;
|
|
159
|
+
#endif
|
|
160
|
+
#ifdef REFLECTIONMAP_3D
|
|
161
|
+
var reflectionCoords: vec3f=reflectionVector;
|
|
162
|
+
#else
|
|
163
|
+
var reflectionCoords: vec2f=reflectionVector.xy;
|
|
164
|
+
#ifdef REFLECTIONMAP_PROJECTION
|
|
165
|
+
reflectionCoords/=reflectionVector.z;
|
|
166
|
+
#endif
|
|
167
|
+
reflectionCoords.y=1.0f-reflectionCoords.y;
|
|
168
|
+
#endif
|
|
169
|
+
return reflectionCoords;}
|
|
170
|
+
fn sampleRadiance(
|
|
171
|
+
alphaG: f32
|
|
172
|
+
,reflectionMicrosurfaceInfos: vec3f
|
|
173
|
+
,reflectionInfos: vec2f
|
|
174
|
+
,geoInfo: geometryInfoOutParams
|
|
175
|
+
#ifdef REFLECTIONMAP_3D
|
|
176
|
+
,reflectionSampler: texture_cube<f32>
|
|
177
|
+
,reflectionSamplerSampler: sampler
|
|
178
|
+
,reflectionCoords: vec3f
|
|
179
|
+
#else
|
|
180
|
+
,reflectionSampler: texture_2d<f32>
|
|
181
|
+
,reflectionSamplerSampler: sampler
|
|
182
|
+
,reflectionCoords: vec2f
|
|
183
|
+
#endif
|
|
184
|
+
#ifdef REALTIME_FILTERING
|
|
185
|
+
,reflectionFilteringInfo: vec2f
|
|
186
|
+
#endif
|
|
187
|
+
)->vec3f {var environmentRadiance: vec4f=vec4f(0.f,0.f,0.f,0.f);
|
|
188
|
+
#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)
|
|
189
|
+
var reflectionLOD: f32=getLodFromAlphaG(reflectionMicrosurfaceInfos.x,alphaG,geoInfo.NdotVUnclamped);
|
|
190
|
+
#elif defined(LINEARSPECULARREFLECTION)
|
|
191
|
+
var reflectionLOD: f32=getLinearLodFromRoughness(reflectionMicrosurfaceInfos.x,roughness);
|
|
192
|
+
#else
|
|
193
|
+
var reflectionLOD: f32=getLodFromAlphaG(reflectionMicrosurfaceInfos.x,alphaG);
|
|
194
|
+
#endif
|
|
195
|
+
reflectionLOD=reflectionLOD*reflectionMicrosurfaceInfos.y+reflectionMicrosurfaceInfos.z;
|
|
196
|
+
#ifdef REALTIME_FILTERING
|
|
197
|
+
environmentRadiance=vec4f(radiance(alphaG,reflectionSampler,reflectionSamplerSampler,reflectionCoords,reflectionFilteringInfo),1.0f);
|
|
198
|
+
#else
|
|
199
|
+
environmentRadiance=textureSampleLevel(reflectionSampler,reflectionSamplerSampler,reflectionCoords,reflectionLOD);
|
|
200
|
+
#endif
|
|
201
|
+
#ifdef RGBDREFLECTION
|
|
202
|
+
environmentRadiance.rgb=fromRGBD(environmentRadiance);
|
|
203
|
+
#endif
|
|
204
|
+
#ifdef GAMMAREFLECTION
|
|
205
|
+
environmentRadiance.rgb=toLinearSpaceVec3(environmentRadiance.rgb);
|
|
206
|
+
#endif
|
|
207
|
+
environmentRadiance=vec4f(environmentRadiance.rgb*reflectionInfos.x,environmentRadiance.a);return environmentRadiance.rgb;}
|
|
208
|
+
#if defined(ANISOTROPIC)
|
|
209
|
+
fn sampleRadianceAnisotropic(
|
|
210
|
+
alphaG: f32
|
|
211
|
+
,reflectionMicrosurfaceInfos: vec3f
|
|
212
|
+
,reflectionInfos: vec2f
|
|
213
|
+
,geoInfo: geometryInfoAnisoOutParams
|
|
214
|
+
,normalW: vec3f
|
|
215
|
+
,viewDirectionW: vec3f
|
|
216
|
+
,positionW: vec3f
|
|
217
|
+
,noise: vec3f
|
|
218
|
+
,isRefraction: bool
|
|
219
|
+
,ior: f32
|
|
220
|
+
#ifdef REFLECTIONMAP_3D
|
|
221
|
+
,reflectionSampler: texture_cube<f32>
|
|
222
|
+
,reflectionSamplerSampler: sampler
|
|
223
|
+
#else
|
|
224
|
+
,reflectionSampler: texture_2d<f32>
|
|
225
|
+
,reflectionSamplerSampler: sampler
|
|
226
|
+
#endif
|
|
227
|
+
#ifdef REALTIME_FILTERING
|
|
228
|
+
,reflectionFilteringInfo: vec2f
|
|
229
|
+
#endif
|
|
230
|
+
)->vec3f {var environmentRadiance: vec4f=vec4f(0.f,0.f,0.f,0.f);let alphaT=alphaG*sqrt(2.0f/(1.0f+(1.0f-geoInfo.anisotropy)*(1.0f-geoInfo.anisotropy)));let alphaB=(1.0f-geoInfo.anisotropy)*alphaT;let modifiedAlphaG=alphaB;
|
|
231
|
+
#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)
|
|
232
|
+
var reflectionLOD: f32=getLodFromAlphaG(reflectionMicrosurfaceInfos.x,modifiedAlphaG,geoInfo.NdotVUnclamped);
|
|
233
|
+
#elif defined(LINEARSPECULARREFLECTION)
|
|
234
|
+
var reflectionLOD: f32=getLinearLodFromRoughness(reflectionMicrosurfaceInfos.x,roughness);
|
|
235
|
+
#else
|
|
236
|
+
var reflectionLOD: f32=getLodFromAlphaG(reflectionMicrosurfaceInfos.x,modifiedAlphaG);
|
|
237
|
+
#endif
|
|
238
|
+
reflectionLOD=reflectionLOD*reflectionMicrosurfaceInfos.y+reflectionMicrosurfaceInfos.z;
|
|
239
|
+
#ifdef REALTIME_FILTERING
|
|
240
|
+
var view=(uniforms.reflectionMatrix*vec4f(viewDirectionW,0.0f)).xyz;var tangent=(uniforms.reflectionMatrix*vec4f(geoInfo.anisotropicTangent,0.0f)).xyz;var bitangent=(uniforms.reflectionMatrix*vec4f(geoInfo.anisotropicBitangent,0.0f)).xyz;var normal=(uniforms.reflectionMatrix*vec4f(normalW,0.0f)).xyz;
|
|
241
|
+
#ifdef REFLECTIONMAP_OPPOSITEZ
|
|
242
|
+
view.z*=-1.0f;tangent.z*=-1.0f;bitangent.z*=-1.0f;normal.z*=-1.0f;
|
|
243
|
+
#endif
|
|
244
|
+
environmentRadiance =
|
|
245
|
+
vec4f(radianceAnisotropic(alphaT,alphaB,reflectionSampler,reflectionSamplerSampler,
|
|
246
|
+
view,tangent,
|
|
247
|
+
bitangent,normal,
|
|
248
|
+
reflectionFilteringInfo,noise.xy,isRefraction,ior),
|
|
249
|
+
1.0f);
|
|
250
|
+
#else
|
|
251
|
+
const samples: i32=16;var radianceSample=vec4f(0.0);var accumulatedRadiance=vec3f(0.0);var reflectionCoords=vec3f(0.0);var sample_weight=0.0f;var total_weight=0.0f;let step=1.0f/f32(max(samples-1,1));for (var i: i32=0; i<samples; i++) {var t: f32=mix(-1.0,1.0,f32(i)*step);t+=step*2.0*noise.x;sample_weight=max(1.0-abs(t),0.001);sample_weight*=sample_weight;t*=min(4.0*alphaT*geoInfo.anisotropy,1.0);var bentNormal: vec3f;if (t<0.0) {let blend: f32=t+1.0;bentNormal=normalize(mix(-geoInfo.anisotropicTangent,normalW,blend));} else if (t>0.0) {let blend: f32=t;bentNormal=normalize(mix(normalW,geoInfo.anisotropicTangent,blend));} else {bentNormal=normalW;}
|
|
252
|
+
if (isRefraction) {reflectionCoords=double_refract(-viewDirectionW,bentNormal,ior);} else {reflectionCoords=reflect(-viewDirectionW,bentNormal);}
|
|
253
|
+
reflectionCoords=(uniforms.reflectionMatrix*vec4f(reflectionCoords,0.f)).xyz;
|
|
254
|
+
#ifdef REFLECTIONMAP_OPPOSITEZ
|
|
255
|
+
reflectionCoords.z*=-1.0f;
|
|
256
|
+
#endif
|
|
257
|
+
radianceSample=textureSampleLevel(reflectionSampler,reflectionSamplerSampler,reflectionCoords,reflectionLOD);
|
|
258
|
+
#ifdef RGBDREFLECTION
|
|
259
|
+
accumulatedRadiance+=vec3f(sample_weight)*fromRGBD(radianceSample);
|
|
260
|
+
#elif defined(GAMMAREFLECTION)
|
|
261
|
+
accumulatedRadiance+=vec3f(sample_weight)*toLinearSpaceVec3(radianceSample.rgb);
|
|
262
|
+
#else
|
|
263
|
+
accumulatedRadiance+=vec3f(sample_weight)*radianceSample.rgb;
|
|
264
|
+
#endif
|
|
265
|
+
total_weight+=sample_weight;}
|
|
266
|
+
environmentRadiance=vec4f(accumulatedRadiance/vec3f(total_weight),1.0f);
|
|
267
|
+
#endif
|
|
268
|
+
environmentRadiance=vec4f(environmentRadiance.rgb*reflectionInfos.xxx,environmentRadiance.a);return environmentRadiance.rgb;}
|
|
269
|
+
#endif
|
|
270
|
+
#endif
|
|
271
|
+
#ifdef ENVIRONMENTBRDF
|
|
272
|
+
fn computeDielectricIblFresnel(reflectance: ReflectanceParams,environmentBrdf: vec3f)->f32
|
|
273
|
+
{let dielectricIblFresnel: f32=getReflectanceFromBRDFWithEnvLookup(vec3f(reflectance.F0),vec3f(reflectance.F90),environmentBrdf).r;let dielectricECF: f32=1.0+reflectance.F0*(1.0/environmentBrdf.y-1.0);return clamp(dielectricIblFresnel*dielectricECF,0.0,1.0);}
|
|
274
|
+
fn computeConductorIblFresnel(reflectance: ReflectanceParams,environmentBrdf: vec3f)->vec3f
|
|
275
|
+
{
|
|
276
|
+
#if (CONDUCTOR_SPECULAR_MODEL==CONDUCTOR_SPECULAR_MODEL_OPENPBR)
|
|
277
|
+
let openPBRBrdf: vec3f=vec3f(environmentBrdf.xy,environmentBrdf.z/BRDF_Z_SCALE);let b: vec3f =getF82B(reflectance.coloredF0,reflectance.coloredF90);let E_F82: vec3f=getF82DirectionalAlbedo(reflectance.coloredF0,vec3f(1.0),b,openPBRBrdf);let F_avg: vec3f=getF82AverageFresnel(reflectance.coloredF0,b);let ECF: vec3f =vec3f(1.0)+F_avg*(vec3f(1.0)/openPBRBrdf.y-vec3f(1.0));return clamp(E_F82*ECF,vec3f(0.0),vec3f(1.0));
|
|
278
|
+
#else
|
|
279
|
+
return getReflectanceFromBRDFLookup(reflectance.coloredF0,reflectance.coloredF90,environmentBrdf);
|
|
280
|
+
#endif
|
|
281
|
+
}
|
|
282
|
+
#endif
|
|
283
|
+
`;
|
|
284
|
+
e.IncludesShadersStoreWGSL[i] || (e.IncludesShadersStoreWGSL[i] = c);
|
|
285
|
+
const o = "openpbrSubsurfaceLayerData", s = `var subsurface_weight: f32=uniforms.vSubsurfaceWeight;var subsurface_color: vec3f=uniforms.vSubsurfaceColor.rgb;var subsurface_radius: f32=uniforms.vSubsurfaceRadius;var subsurface_radius_scale: vec3f=uniforms.vSubsurfaceRadiusScale;var subsurface_scatter_anisotropy: f32=clamp(uniforms.vSubsurfaceScatterAnisotropy,-0.9999f,0.9999f);
|
|
286
|
+
#ifdef SUBSURFACE_WEIGHT
|
|
287
|
+
let subsurfaceWeightFromTexture: vec4f=TEXRD(subsurfaceWeightSampler,subsurfaceWeightSamplerSampler,fragmentInputs.vSubsurfaceWeightUV+uvOffset);
|
|
288
|
+
#endif
|
|
289
|
+
#ifdef SUBSURFACE_COLOR
|
|
290
|
+
let subsurfaceColorFromTexture: vec4f=TEXRD(subsurfaceColorSampler,subsurfaceColorSamplerSampler,fragmentInputs.vSubsurfaceColorUV+uvOffset);
|
|
291
|
+
#endif
|
|
292
|
+
#ifdef SUBSURFACE_RADIUS_SCALE
|
|
293
|
+
let subsurfaceRadiusScaleFromTexture: vec4f=TEXRD(subsurfaceRadiusScaleSampler,subsurfaceRadiusScaleSamplerSampler,fragmentInputs.vSubsurfaceRadiusScaleUV+uvOffset);
|
|
294
|
+
#endif
|
|
295
|
+
#ifdef SUBSURFACE_WEIGHT
|
|
296
|
+
#ifdef SUBSURFACE_WEIGHT_FROM_TEXTURE_ALPHA
|
|
297
|
+
subsurface_weight*=subsurfaceWeightFromTexture.a;
|
|
298
|
+
#else
|
|
299
|
+
subsurface_weight*=subsurfaceWeightFromTexture.r;
|
|
300
|
+
#endif
|
|
301
|
+
#endif
|
|
302
|
+
#ifdef SUBSURFACE_COLOR
|
|
303
|
+
#ifdef SUBSURFACE_COLOR_GAMMA
|
|
304
|
+
subsurface_color*=toLinearSpaceVec3(subsurfaceColorFromTexture.rgb);
|
|
305
|
+
#else
|
|
306
|
+
subsurface_color*=subsurfaceColorFromTexture.rgb;
|
|
307
|
+
#endif
|
|
308
|
+
subsurface_color*=uniforms.vSubsurfaceColorInfos.y;
|
|
309
|
+
#endif
|
|
310
|
+
#ifdef SUBSURFACE_RADIUS_SCALE
|
|
311
|
+
subsurface_radius_scale*=subsurfaceRadiusScaleFromTexture.rgb;
|
|
312
|
+
#endif
|
|
313
|
+
`;
|
|
314
|
+
e.IncludesShadersStoreWGSL[o] || (e.IncludesShadersStoreWGSL[o] = s);
|
|
315
|
+
const f = "openpbrTransmissionLayerData", l = `var transmission_weight: f32=uniforms.vTransmissionWeight;var transmission_color: vec3f=uniforms.vTransmissionColor.rgb;var transmission_depth: f32=uniforms.vTransmissionDepth;var transmission_scatter: vec3f=uniforms.vTransmissionScatter.rgb;var transmission_scatter_anisotropy: f32=clamp(uniforms.vTransmissionScatterAnisotropy,-0.9999f,0.9999f);var transmission_dispersion_scale: f32=uniforms.vTransmissionDispersionScale;var transmission_dispersion_abbe_number: f32=uniforms.vTransmissionDispersionAbbeNumber;
|
|
316
|
+
#ifdef TRANSMISSION_WEIGHT
|
|
317
|
+
let transmissionWeightFromTexture: vec4f=TEXRD(transmissionWeightSampler,transmissionWeightSamplerSampler,fragmentInputs.vTransmissionWeightUV+uvOffset);
|
|
318
|
+
#endif
|
|
319
|
+
#ifdef TRANSMISSION_COLOR
|
|
320
|
+
let transmissionColorFromTexture: vec4f=TEXRD(transmissionColorSampler,transmissionColorSamplerSampler,fragmentInputs.vTransmissionColorUV+uvOffset);
|
|
321
|
+
#endif
|
|
322
|
+
#ifdef TRANSMISSION_DEPTH
|
|
323
|
+
let transmissionDepthFromTexture: vec4f=TEXRD(transmissionDepthSampler,transmissionDepthSamplerSampler,fragmentInputs.vTransmissionDepthUV+uvOffset);
|
|
324
|
+
#endif
|
|
325
|
+
#ifdef TRANSMISSION_SCATTER
|
|
326
|
+
let transmissionScatterFromTexture: vec4f=TEXRD(transmissionScatterSampler,transmissionScatterSamplerSampler,fragmentInputs.vTransmissionScatterUV+uvOffset);
|
|
327
|
+
#endif
|
|
328
|
+
#ifdef TRANSMISSION_DISPERSION_SCALE
|
|
329
|
+
let transmissionDispersionScaleFromTexture: vec4f=TEXRD(transmissionDispersionScaleSampler,transmissionDispersionScaleSamplerSampler,fragmentInputs.vTransmissionDispersionScaleUV+uvOffset);
|
|
330
|
+
#endif
|
|
331
|
+
#ifdef TRANSMISSION_WEIGHT
|
|
332
|
+
transmission_weight*=transmissionWeightFromTexture.r;
|
|
333
|
+
#endif
|
|
334
|
+
#ifdef TRANSMISSION_COLOR
|
|
335
|
+
#ifdef TRANSMISSION_COLOR_GAMMA
|
|
336
|
+
transmission_color*=toLinearSpaceVec3(transmissionColorFromTexture.rgb);
|
|
337
|
+
#else
|
|
338
|
+
transmission_color*=transmissionColorFromTexture.rgb;
|
|
339
|
+
#endif
|
|
340
|
+
transmission_color*=uniforms.vTransmissionColorInfos.y;
|
|
341
|
+
#endif
|
|
342
|
+
#ifdef TRANSMISSION_DEPTH
|
|
343
|
+
transmission_depth*=transmissionDepthFromTexture.r;
|
|
344
|
+
#endif
|
|
345
|
+
#ifdef TRANSMISSION_SCATTER
|
|
346
|
+
transmission_scatter*=transmissionScatterFromTexture.rgb;
|
|
347
|
+
#endif
|
|
348
|
+
#ifdef TRANSMISSION_DISPERSION_SCALE
|
|
349
|
+
transmission_dispersion_scale*=transmissionDispersionScaleFromTexture.r;
|
|
350
|
+
#endif
|
|
351
|
+
`;
|
|
352
|
+
e.IncludesShadersStoreWGSL[f] || (e.IncludesShadersStoreWGSL[f] = l);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { b0 as o } from "./index-CS3Icp_r.js";
|
|
2
|
+
import "./sceneUboDeclaration-JByfVKik.js";
|
|
3
|
+
import "./logDepthDeclaration-Bwm-3KyB.js";
|
|
4
|
+
const f = "openpbrUboDeclaration", i = `uniform vTangentSpaceParams: vec2f;uniform vLightingIntensity: vec4f;uniform pointSize: f32;uniform vDebugMode: vec2f;uniform renderTargetSize: vec2f;uniform cameraInfo: vec4f;uniform vTextureRepetitionHexTilingParams: vec4f;uniform backgroundRefractionMatrix: mat4x4f;uniform vBackgroundRefractionInfos: vec3f;uniform vReflectionInfos: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionMicrosurfaceInfos: vec3f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;uniform vReflectionFilteringInfo: vec2f;uniform vReflectionDominantDirection: vec3f;uniform vReflectionColor: vec3f;uniform vSphericalL00: vec3f;uniform vSphericalL1_1: vec3f;uniform vSphericalL10: vec3f;uniform vSphericalL11: vec3f;uniform vSphericalL2_2: vec3f;uniform vSphericalL2_1: vec3f;uniform vSphericalL20: vec3f;uniform vSphericalL21: vec3f;uniform vSphericalL22: vec3f;uniform vSphericalX: vec3f;uniform vSphericalY: vec3f;uniform vSphericalZ: vec3f;uniform vSphericalXX_ZZ: vec3f;uniform vSphericalYY_ZZ: vec3f;uniform vSphericalZZ: vec3f;uniform vSphericalXY: vec3f;uniform vSphericalYZ: vec3f;uniform vSphericalZX: vec3f;uniform vBaseWeight: f32;uniform vBaseColor: vec4f;uniform vBaseDiffuseRoughness: f32;uniform vReflectanceInfo: vec4f;uniform vSpecularColor: vec4f;uniform vSpecularAnisotropy: vec3f;uniform vTransmissionWeight : f32;uniform vTransmissionColor : vec3f;uniform vTransmissionDepth : f32;uniform vTransmissionScatter : vec3f;uniform vTransmissionScatterAnisotropy : f32;uniform vTransmissionDispersionScale : f32;uniform vTransmissionDispersionAbbeNumber : f32;uniform vSubsurfaceWeight: f32;uniform vSubsurfaceColor: vec3f;uniform vSubsurfaceRadius: f32;uniform vSubsurfaceRadiusScale: vec3f;uniform vSubsurfaceScatterAnisotropy: f32;uniform vCoatWeight: f32;uniform vCoatColor: vec3f;uniform vCoatRoughness: f32;uniform vCoatRoughnessAnisotropy: f32;uniform vCoatIor: f32;uniform vCoatDarkening : f32;uniform vFuzzWeight: f32;uniform vFuzzColor: vec3f;uniform vFuzzRoughness: f32;uniform vGeometryThinWalled: f32;uniform vGeometryCoatTangent: vec2f;uniform vGeometryThickness: f32;uniform vEmissionColor: vec3f;uniform vThinFilmWeight: f32;uniform vThinFilmThickness: vec2f;uniform vThinFilmIor: f32;uniform vBaseWeightInfos: vec2f;uniform baseWeightMatrix: mat4x4f;uniform vBaseColorInfos: vec2f;uniform baseColorMatrix: mat4x4f;uniform vBaseDiffuseRoughnessInfos: vec2f;uniform baseDiffuseRoughnessMatrix: mat4x4f;uniform vBaseMetalnessInfos: vec2f;uniform baseMetalnessMatrix: mat4x4f;uniform vSpecularWeightInfos: vec2f;uniform specularWeightMatrix: mat4x4f;uniform vSpecularColorInfos: vec2f;uniform specularColorMatrix: mat4x4f;uniform vSpecularRoughnessInfos: vec2f;uniform specularRoughnessMatrix: mat4x4f;uniform vSpecularRoughnessAnisotropyInfos: vec2f;uniform specularRoughnessAnisotropyMatrix: mat4x4f;uniform vTransmissionWeightInfos : vec2f;uniform transmissionWeightMatrix : mat4x4f;uniform vTransmissionColorInfos : vec2f;uniform transmissionColorMatrix : mat4x4f;uniform vTransmissionDepthInfos : vec2f;uniform transmissionDepthMatrix : mat4x4f;uniform vTransmissionScatterInfos : vec2f;uniform transmissionScatterMatrix : mat4x4f;uniform vTransmissionDispersionScaleInfos : vec2f;uniform transmissionDispersionScaleMatrix : mat4x4f;uniform vSubsurfaceWeightInfos: vec2f;uniform subsurfaceWeightMatrix: mat4x4f;uniform vSubsurfaceColorInfos: vec2f;uniform subsurfaceColorMatrix: mat4x4f;uniform vSubsurfaceRadiusScaleInfos: vec2f;uniform subsurfaceRadiusScaleMatrix: mat4x4f;uniform vCoatWeightInfos: vec2f;uniform coatWeightMatrix: mat4x4f;uniform vCoatColorInfos: vec2f;uniform coatColorMatrix: mat4x4f;uniform vCoatRoughnessInfos: vec2f;uniform coatRoughnessMatrix: mat4x4f;uniform vCoatRoughnessAnisotropyInfos: vec2f;uniform coatRoughnessAnisotropyMatrix: mat4x4f;uniform vCoatDarkeningInfos : vec2f;uniform coatDarkeningMatrix : mat4x4f;uniform vFuzzWeightInfos: vec2f;uniform fuzzWeightMatrix: mat4x4f;uniform vFuzzColorInfos: vec2f;uniform fuzzColorMatrix: mat4x4f;uniform vFuzzRoughnessInfos: vec2f;uniform fuzzRoughnessMatrix: mat4x4f;uniform vGeometryNormalInfos: vec2f;uniform geometryNormalMatrix: mat4x4f;uniform vGeometryTangentInfos: vec2f;uniform geometryTangentMatrix: mat4x4f;uniform vGeometryCoatNormalInfos: vec2f;uniform geometryCoatNormalMatrix: mat4x4f;uniform vGeometryCoatTangentInfos: vec2f;uniform geometryCoatTangentMatrix: mat4x4f;uniform vGeometryOpacityInfos: vec2f;uniform geometryOpacityMatrix: mat4x4f;uniform vGeometryThicknessInfos: vec2f;uniform geometryThicknessMatrix: mat4x4f;uniform vEmissionColorInfos: vec2f;uniform emissionColorMatrix: mat4x4f;uniform vThinFilmWeightInfos: vec2f;uniform thinFilmWeightMatrix: mat4x4f;uniform vThinFilmThicknessInfos: vec2f;uniform thinFilmThicknessMatrix: mat4x4f;uniform vAmbientOcclusionInfos: vec2f;uniform ambientOcclusionMatrix: mat4x4f;
|
|
5
|
+
#define ADDITIONAL_UBO_DECLARATION
|
|
6
|
+
#include<sceneUboDeclaration>
|
|
7
|
+
#include<meshUboDeclaration>
|
|
8
|
+
`;
|
|
9
|
+
o.IncludesShadersStoreWGSL[f] || (o.IncludesShadersStoreWGSL[f] = i);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { b0 as e } from "./index-CS3Icp_r.js";
|
|
2
|
+
import "./sceneUboDeclaration-B6oxsfcj.js";
|
|
3
|
+
import "./logDepthDeclaration-gUfeSnXX.js";
|
|
4
|
+
const a = "openpbrUboDeclaration", o = `layout(std140,column_major) uniform;uniform Material {vec2 vTangentSpaceParams;vec4 vLightingIntensity;float pointSize;vec2 vDebugMode;vec2 renderTargetSize;vec4 cameraInfo;vec4 vTextureRepetitionHexTilingParams;mat4 backgroundRefractionMatrix;vec3 vBackgroundRefractionInfos;vec2 vReflectionInfos;mat4 reflectionMatrix;vec3 vReflectionMicrosurfaceInfos;vec3 vReflectionPosition;vec3 vReflectionSize;vec2 vReflectionFilteringInfo;vec3 vReflectionDominantDirection;vec3 vReflectionColor;vec3 vSphericalL00;vec3 vSphericalL1_1;vec3 vSphericalL10;vec3 vSphericalL11;vec3 vSphericalL2_2;vec3 vSphericalL2_1;vec3 vSphericalL20;vec3 vSphericalL21;vec3 vSphericalL22;vec3 vSphericalX;vec3 vSphericalY;vec3 vSphericalZ;vec3 vSphericalXX_ZZ;vec3 vSphericalYY_ZZ;vec3 vSphericalZZ;vec3 vSphericalXY;vec3 vSphericalYZ;vec3 vSphericalZX;float vBaseWeight;vec4 vBaseColor;float vBaseDiffuseRoughness;vec4 vReflectanceInfo;vec4 vSpecularColor;vec3 vSpecularAnisotropy;float vTransmissionWeight;vec3 vTransmissionColor;float vTransmissionDepth;vec3 vTransmissionScatter;float vTransmissionScatterAnisotropy;float vTransmissionDispersionScale;float vTransmissionDispersionAbbeNumber;float vSubsurfaceWeight;vec3 vSubsurfaceColor;float vSubsurfaceRadius;vec3 vSubsurfaceRadiusScale;float vSubsurfaceScatterAnisotropy;float vCoatWeight;vec3 vCoatColor;float vCoatRoughness;float vCoatRoughnessAnisotropy;float vCoatIor;float vCoatDarkening;float vFuzzWeight;vec3 vFuzzColor;float vFuzzRoughness;float vGeometryThinWalled;vec2 vGeometryCoatTangent;float vGeometryThickness;vec3 vEmissionColor;float vThinFilmWeight;vec2 vThinFilmThickness;float vThinFilmIor;vec2 vBaseWeightInfos;mat4 baseWeightMatrix;vec2 vBaseColorInfos;mat4 baseColorMatrix;vec2 vBaseDiffuseRoughnessInfos;mat4 baseDiffuseRoughnessMatrix;vec2 vBaseMetalnessInfos;mat4 baseMetalnessMatrix;vec2 vSpecularWeightInfos;mat4 specularWeightMatrix;vec2 vSpecularColorInfos;mat4 specularColorMatrix;vec2 vSpecularRoughnessInfos;mat4 specularRoughnessMatrix;vec2 vSpecularRoughnessAnisotropyInfos;mat4 specularRoughnessAnisotropyMatrix;vec2 vTransmissionWeightInfos;mat4 transmissionWeightMatrix;vec2 vTransmissionColorInfos;mat4 transmissionColorMatrix;vec2 vTransmissionDepthInfos;mat4 transmissionDepthMatrix;vec2 vTransmissionScatterInfos;mat4 transmissionScatterMatrix;vec2 vTransmissionDispersionScaleInfos;mat4 transmissionDispersionScaleMatrix;vec2 vSubsurfaceWeightInfos;mat4 subsurfaceWeightMatrix;vec2 vSubsurfaceColorInfos;mat4 subsurfaceColorMatrix;vec2 vSubsurfaceRadiusScaleInfos;mat4 subsurfaceRadiusScaleMatrix;vec2 vCoatWeightInfos;mat4 coatWeightMatrix;vec2 vCoatColorInfos;mat4 coatColorMatrix;vec2 vCoatRoughnessInfos;mat4 coatRoughnessMatrix;vec2 vCoatRoughnessAnisotropyInfos;mat4 coatRoughnessAnisotropyMatrix;vec2 vCoatDarkeningInfos;mat4 coatDarkeningMatrix;vec2 vFuzzWeightInfos;mat4 fuzzWeightMatrix;vec2 vFuzzColorInfos;mat4 fuzzColorMatrix;vec2 vFuzzRoughnessInfos;mat4 fuzzRoughnessMatrix;vec2 vGeometryNormalInfos;mat4 geometryNormalMatrix;vec2 vGeometryTangentInfos;mat4 geometryTangentMatrix;vec2 vGeometryCoatNormalInfos;mat4 geometryCoatNormalMatrix;vec2 vGeometryCoatTangentInfos;mat4 geometryCoatTangentMatrix;vec2 vGeometryOpacityInfos;mat4 geometryOpacityMatrix;vec2 vGeometryThicknessInfos;mat4 geometryThicknessMatrix;vec2 vEmissionColorInfos;mat4 emissionColorMatrix;vec2 vThinFilmWeightInfos;mat4 thinFilmWeightMatrix;vec2 vThinFilmThicknessInfos;mat4 thinFilmThicknessMatrix;vec2 vAmbientOcclusionInfos;mat4 ambientOcclusionMatrix;
|
|
5
|
+
#define ADDITIONAL_UBO_DECLARATION
|
|
6
|
+
};
|
|
7
|
+
#include<sceneUboDeclaration>
|
|
8
|
+
#include<meshUboDeclaration>
|
|
9
|
+
`;
|
|
10
|
+
e.IncludesShadersStore[a] || (e.IncludesShadersStore[a] = o);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { b0 as r } from "./index-CS3Icp_r.js";
|
|
2
|
+
const e = "passPixelShader", t = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
3
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
4
|
+
@fragment
|
|
5
|
+
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,input.vUV);}`;
|
|
6
|
+
r.ShadersStoreWGSL[e] || (r.ShadersStoreWGSL[e] = t);
|
|
7
|
+
const S = { name: e, shader: t };
|
|
8
|
+
export {
|
|
9
|
+
S as passPixelShaderWGSL
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { b0 as r } from "./index-CS3Icp_r.js";
|
|
2
|
+
const e = "passPixelShader", a = `varying vec2 vUV;uniform sampler2D textureSampler;
|
|
3
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
4
|
+
void main(void)
|
|
5
|
+
{gl_FragColor=texture2D(textureSampler,vUV);}`;
|
|
6
|
+
r.ShadersStore[e] || (r.ShadersStore[e] = a);
|
|
7
|
+
const t = { name: e, shader: a };
|
|
8
|
+
export {
|
|
9
|
+
t as passPixelShader
|
|
10
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { b0 as r } from "./index-CS3Icp_r.js";
|
|
2
|
+
const e = "passCubePixelShader", t = `varying vec2 vUV;uniform samplerCube textureSampler;
|
|
3
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
4
|
+
void main(void)
|
|
5
|
+
{vec2 uv=vUV*2.0-1.0;
|
|
6
|
+
#ifdef POSITIVEX
|
|
7
|
+
gl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x));
|
|
8
|
+
#endif
|
|
9
|
+
#ifdef NEGATIVEX
|
|
10
|
+
gl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x));
|
|
11
|
+
#endif
|
|
12
|
+
#ifdef POSITIVEY
|
|
13
|
+
gl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x));
|
|
14
|
+
#endif
|
|
15
|
+
#ifdef NEGATIVEY
|
|
16
|
+
gl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x));
|
|
17
|
+
#endif
|
|
18
|
+
#ifdef POSITIVEZ
|
|
19
|
+
gl_FragColor=textureCube(textureSampler,vec3(uv,1.001));
|
|
20
|
+
#endif
|
|
21
|
+
#ifdef NEGATIVEZ
|
|
22
|
+
gl_FragColor=textureCube(textureSampler,vec3(uv,-1.001));
|
|
23
|
+
#endif
|
|
24
|
+
}`;
|
|
25
|
+
r.ShadersStore[e] || (r.ShadersStore[e] = t);
|
|
26
|
+
const a = { name: e, shader: t };
|
|
27
|
+
export {
|
|
28
|
+
a as passCubePixelShader
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { b0 as t } from "./index-CS3Icp_r.js";
|
|
2
|
+
const e = "passCubePixelShader", r = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_cube<f32>;
|
|
3
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
4
|
+
@fragment
|
|
5
|
+
fn main(input: FragmentInputs)->FragmentOutputs {var uv: vec2f=input.vUV*2.0-1.0;
|
|
6
|
+
#ifdef POSITIVEX
|
|
7
|
+
fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(1.001,uv.y,uv.x));
|
|
8
|
+
#endif
|
|
9
|
+
#ifdef NEGATIVEX
|
|
10
|
+
fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(-1.001,uv.y,uv.x));
|
|
11
|
+
#endif
|
|
12
|
+
#ifdef POSITIVEY
|
|
13
|
+
fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv.y,1.001,uv.x));
|
|
14
|
+
#endif
|
|
15
|
+
#ifdef NEGATIVEY
|
|
16
|
+
fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv.y,-1.001,uv.x));
|
|
17
|
+
#endif
|
|
18
|
+
#ifdef POSITIVEZ
|
|
19
|
+
fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv,1.001));
|
|
20
|
+
#endif
|
|
21
|
+
#ifdef NEGATIVEZ
|
|
22
|
+
fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv,-1.001));
|
|
23
|
+
#endif
|
|
24
|
+
}`;
|
|
25
|
+
t.ShadersStoreWGSL[e] || (t.ShadersStoreWGSL[e] = r);
|
|
26
|
+
const u = { name: e, shader: r };
|
|
27
|
+
export {
|
|
28
|
+
u as passCubePixelShaderWGSL
|
|
29
|
+
};
|