@onerjs/addons 8.25.4 → 8.25.5
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/atmosphere/Shaders/ShadersInclude/atmosphereFragmentDeclaration.d.ts +5 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereFragmentDeclaration.js +12 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereFragmentDeclaration.js.map +1 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereFunctions.d.ts +6 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereFunctions.js +234 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereFunctions.js.map +1 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereUboDeclaration.d.ts +5 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereUboDeclaration.js +12 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereUboDeclaration.js.map +1 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereVertexDeclaration.d.ts +5 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereVertexDeclaration.js +12 -0
- package/atmosphere/Shaders/ShadersInclude/atmosphereVertexDeclaration.js.map +1 -0
- package/atmosphere/Shaders/ShadersInclude/depthFunctions.d.ts +5 -0
- package/atmosphere/Shaders/ShadersInclude/depthFunctions.js +19 -0
- package/atmosphere/Shaders/ShadersInclude/depthFunctions.js.map +1 -0
- package/atmosphere/Shaders/aerialPerspective.fragment.d.ts +9 -0
- package/atmosphere/Shaders/aerialPerspective.fragment.js +25 -0
- package/atmosphere/Shaders/aerialPerspective.fragment.js.map +1 -0
- package/atmosphere/Shaders/compositeAerialPerspective.fragment.d.ts +10 -0
- package/atmosphere/Shaders/compositeAerialPerspective.fragment.js +72 -0
- package/atmosphere/Shaders/compositeAerialPerspective.fragment.js.map +1 -0
- package/atmosphere/Shaders/compositeGlobeAtmosphere.fragment.d.ts +10 -0
- package/atmosphere/Shaders/compositeGlobeAtmosphere.fragment.js +96 -0
- package/atmosphere/Shaders/compositeGlobeAtmosphere.fragment.js.map +1 -0
- package/atmosphere/Shaders/compositeSky.fragment.d.ts +10 -0
- package/atmosphere/Shaders/compositeSky.fragment.js +75 -0
- package/atmosphere/Shaders/compositeSky.fragment.js.map +1 -0
- package/atmosphere/Shaders/diffuseSkyIrradiance.fragment.d.ts +13 -0
- package/atmosphere/Shaders/diffuseSkyIrradiance.fragment.js +49 -0
- package/atmosphere/Shaders/diffuseSkyIrradiance.fragment.js.map +1 -0
- package/atmosphere/Shaders/fullscreenTriangle.vertex.d.ts +7 -0
- package/atmosphere/Shaders/fullscreenTriangle.vertex.js +31 -0
- package/atmosphere/Shaders/fullscreenTriangle.vertex.js.map +1 -0
- package/atmosphere/Shaders/multiScattering.fragment.d.ts +9 -0
- package/atmosphere/Shaders/multiScattering.fragment.js +21 -0
- package/atmosphere/Shaders/multiScattering.fragment.js.map +1 -0
- package/atmosphere/Shaders/skyView.fragment.d.ts +9 -0
- package/atmosphere/Shaders/skyView.fragment.js +20 -0
- package/atmosphere/Shaders/skyView.fragment.js.map +1 -0
- package/atmosphere/Shaders/transmittance.fragment.d.ts +9 -0
- package/atmosphere/Shaders/transmittance.fragment.js +20 -0
- package/atmosphere/Shaders/transmittance.fragment.js.map +1 -0
- package/atmosphere/atmosphere.d.ts +418 -0
- package/atmosphere/atmosphere.js +1446 -0
- package/atmosphere/atmosphere.js.map +1 -0
- package/atmosphere/atmosphereOptions.d.ts +135 -0
- package/atmosphere/atmosphereOptions.js +4 -0
- package/atmosphere/atmosphereOptions.js.map +1 -0
- package/atmosphere/atmospherePBRMaterialPlugin.d.ts +72 -0
- package/atmosphere/atmospherePBRMaterialPlugin.js +230 -0
- package/atmosphere/atmospherePBRMaterialPlugin.js.map +1 -0
- package/atmosphere/atmospherePerCameraVariables.d.ts +102 -0
- package/atmosphere/atmospherePerCameraVariables.js +189 -0
- package/atmosphere/atmospherePerCameraVariables.js.map +1 -0
- package/atmosphere/atmospherePhysicalProperties.d.ts +154 -0
- package/atmosphere/atmospherePhysicalProperties.js +305 -0
- package/atmosphere/atmospherePhysicalProperties.js.map +1 -0
- package/atmosphere/atmospherePhysicalPropertiesOptions.d.ts +52 -0
- package/atmosphere/atmospherePhysicalPropertiesOptions.js +4 -0
- package/atmosphere/atmospherePhysicalPropertiesOptions.js.map +1 -0
- package/atmosphere/diffuseSkyIrradianceLut.d.ts +63 -0
- package/atmosphere/diffuseSkyIrradianceLut.js +199 -0
- package/atmosphere/diffuseSkyIrradianceLut.js.map +1 -0
- package/atmosphere/index.d.ts +6 -0
- package/atmosphere/index.js +9 -0
- package/atmosphere/index.js.map +1 -0
- package/atmosphere/sampling.d.ts +15 -0
- package/atmosphere/sampling.js +89 -0
- package/atmosphere/sampling.js.map +1 -0
- package/atmosphere/test/unit/sampling.test.d.ts +1 -0
- package/atmosphere/test/unit/sampling.test.js +77 -0
- package/atmosphere/test/unit/sampling.test.js.map +1 -0
- package/atmosphere/transmittanceLut.d.ts +68 -0
- package/atmosphere/transmittanceLut.js +207 -0
- package/atmosphere/transmittanceLut.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/msdfText/paragraphOptions.d.ts +1 -1
- package/msdfText/paragraphOptions.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Do not edit.
|
|
2
|
+
import { ShaderStore } from "@onerjs/core/Engines/shaderStore.js";
|
|
3
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
5
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
6
|
+
import "../Shaders/ShadersInclude/depthFunctions.js";
|
|
7
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
8
|
+
const name = "compositeGlobeAtmospherePixelShader";
|
|
9
|
+
const shader = `precision highp float;precision highp sampler2D;
|
|
10
|
+
#include<__decl__atmosphereFragment>
|
|
11
|
+
#include<helperFunctions>
|
|
12
|
+
#include<depthFunctions>
|
|
13
|
+
#include<atmosphereFunctions>
|
|
14
|
+
varying vec2 uv;varying vec3 positionOnNearPlane;
|
|
15
|
+
#if HAS_DEPTH_TEXTURE
|
|
16
|
+
uniform sampler2D depthTexture;
|
|
17
|
+
#endif
|
|
18
|
+
#if USE_SKY_VIEW_LUT
|
|
19
|
+
uniform sampler2D skyViewLut;
|
|
20
|
+
#else
|
|
21
|
+
uniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;
|
|
22
|
+
#endif
|
|
23
|
+
void main() {gl_FragColor=vec4(0.);
|
|
24
|
+
#if HAS_DEPTH_TEXTURE
|
|
25
|
+
float depth=textureLod(depthTexture,uv,0.).r;
|
|
26
|
+
#endif
|
|
27
|
+
vec3 rayDirection=normalize(positionOnNearPlane);
|
|
28
|
+
#if USE_SKY_VIEW_LUT
|
|
29
|
+
float cosAngleBetweenViewAndZenith;bool isRayIntersectingGround;vec4 skyColor =
|
|
30
|
+
sampleSkyViewLut(
|
|
31
|
+
skyViewLut,
|
|
32
|
+
clampedCameraRadius,
|
|
33
|
+
cameraGeocentricNormal,
|
|
34
|
+
rayDirection,
|
|
35
|
+
directionToLight,
|
|
36
|
+
cosCameraHorizonAngleFromZenith,
|
|
37
|
+
cosAngleBetweenViewAndZenith,
|
|
38
|
+
isRayIntersectingGround);gl_FragColor=skyColor;if (isRayIntersectingGround) {gl_FragColor =
|
|
39
|
+
applyAerialPerspectiveRadianceBias(
|
|
40
|
+
applyAerialPerspectiveIntensity(
|
|
41
|
+
applyAerialPerspectiveSaturation(gl_FragColor)));
|
|
42
|
+
#if HAS_DEPTH_TEXTURE
|
|
43
|
+
gl_FragColor.a=depth>=1. ? 1. : gl_FragColor.a;
|
|
44
|
+
#endif
|
|
45
|
+
}
|
|
46
|
+
#else
|
|
47
|
+
bool intersectsAtmosphere=false;vec3 cameraPositionGlobalClampedToTopOfAtmosphere=vec3(0.);moveToTopAtmosphere(
|
|
48
|
+
clampedCameraPositionGlobal,
|
|
49
|
+
clampedCameraRadius,
|
|
50
|
+
cameraGeocentricNormal,
|
|
51
|
+
rayDirection,
|
|
52
|
+
intersectsAtmosphere,
|
|
53
|
+
cameraPositionGlobalClampedToTopOfAtmosphere);if (!intersectsAtmosphere) {return;}
|
|
54
|
+
#if HAS_DEPTH_TEXTURE
|
|
55
|
+
float distanceFromCamera =
|
|
56
|
+
reconstructDistanceFromCamera(
|
|
57
|
+
depth,
|
|
58
|
+
rayDirection,
|
|
59
|
+
cameraForward,
|
|
60
|
+
cameraNearPlane);float distanceToSurface=distanceFromCamera/1000.;
|
|
61
|
+
#else
|
|
62
|
+
float distanceToSurface=0.;
|
|
63
|
+
#endif
|
|
64
|
+
vec3 transmittance;vec3 radiance;integrateScatteredRadiance(
|
|
65
|
+
false,
|
|
66
|
+
atmosphereExposure*lightIntensity,
|
|
67
|
+
transmittanceLut,
|
|
68
|
+
multiScatteringLut,
|
|
69
|
+
multiScatteringIntensity,
|
|
70
|
+
cameraPositionGlobalClampedToTopOfAtmosphere,
|
|
71
|
+
rayDirection,
|
|
72
|
+
directionToLight,
|
|
73
|
+
100000000.,
|
|
74
|
+
SkyViewLutSampleCount,
|
|
75
|
+
distanceToSurface,
|
|
76
|
+
radiance,
|
|
77
|
+
transmittance);float transparency=1.-avg(transmittance);gl_FragColor=vec4(radiance,transparency);if (distanceToSurface>0.) {gl_FragColor =
|
|
78
|
+
applyAerialPerspectiveRadianceBias(
|
|
79
|
+
applyAerialPerspectiveIntensity(
|
|
80
|
+
applyAerialPerspectiveSaturation(gl_FragColor)));
|
|
81
|
+
#if HAS_DEPTH_TEXTURE
|
|
82
|
+
gl_FragColor.a=depth>=1. ? 1. : gl_FragColor.a;
|
|
83
|
+
#endif
|
|
84
|
+
}
|
|
85
|
+
#endif
|
|
86
|
+
#if OUTPUT_TO_SRGB
|
|
87
|
+
gl_FragColor=toGammaSpace(gl_FragColor);
|
|
88
|
+
#endif
|
|
89
|
+
}`;
|
|
90
|
+
// Sideeffect
|
|
91
|
+
if (!ShaderStore.ShadersStore[name]) {
|
|
92
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
93
|
+
}
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const compositeGlobeAtmospherePixelShader = { name, shader };
|
|
96
|
+
//# sourceMappingURL=compositeGlobeAtmosphere.fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compositeGlobeAtmosphere.fragment.js","sourceRoot":"","sources":["../../../../../dev/addons/src/atmosphere/Shaders/compositeGlobeAtmosphere.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,4CAAiC;AACvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,gEAAqD;AACrD,OAAO,0CAA0C,CAAC;AAClD,OAAO,+CAA+C,CAAC;AAEvD,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFb,CAAC;AACH,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,mCAAmC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"../Shaders/ShadersInclude/atmosphereFragmentDeclaration\";\nimport \"../Shaders/ShadersInclude/atmosphereUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"../Shaders/ShadersInclude/depthFunctions\";\nimport \"../Shaders/ShadersInclude/atmosphereFunctions\";\n\nconst name = \"compositeGlobeAtmospherePixelShader\";\nconst shader = `precision highp float;precision highp sampler2D;\n#include<__decl__atmosphereFragment>\n#include<helperFunctions>\n#include<depthFunctions>\n#include<atmosphereFunctions>\nvarying vec2 uv;varying vec3 positionOnNearPlane;\n#if HAS_DEPTH_TEXTURE\nuniform sampler2D depthTexture;\n#endif\n#if USE_SKY_VIEW_LUT\nuniform sampler2D skyViewLut;\n#else\nuniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;\n#endif\nvoid main() {gl_FragColor=vec4(0.);\n#if HAS_DEPTH_TEXTURE\nfloat depth=textureLod(depthTexture,uv,0.).r;\n#endif\nvec3 rayDirection=normalize(positionOnNearPlane);\n#if USE_SKY_VIEW_LUT\nfloat cosAngleBetweenViewAndZenith;bool isRayIntersectingGround;vec4 skyColor =\nsampleSkyViewLut(\nskyViewLut,\nclampedCameraRadius,\ncameraGeocentricNormal,\nrayDirection,\ndirectionToLight,\ncosCameraHorizonAngleFromZenith,\ncosAngleBetweenViewAndZenith,\nisRayIntersectingGround);gl_FragColor=skyColor;if (isRayIntersectingGround) {gl_FragColor =\napplyAerialPerspectiveRadianceBias(\napplyAerialPerspectiveIntensity(\napplyAerialPerspectiveSaturation(gl_FragColor)));\n#if HAS_DEPTH_TEXTURE\ngl_FragColor.a=depth>=1. ? 1. : gl_FragColor.a;\n#endif\n}\n#else\nbool intersectsAtmosphere=false;vec3 cameraPositionGlobalClampedToTopOfAtmosphere=vec3(0.);moveToTopAtmosphere(\nclampedCameraPositionGlobal,\nclampedCameraRadius,\ncameraGeocentricNormal,\nrayDirection,\nintersectsAtmosphere,\ncameraPositionGlobalClampedToTopOfAtmosphere);if (!intersectsAtmosphere) {return;}\n#if HAS_DEPTH_TEXTURE\nfloat distanceFromCamera =\nreconstructDistanceFromCamera(\ndepth,\nrayDirection,\ncameraForward,\ncameraNearPlane);float distanceToSurface=distanceFromCamera/1000.;\n#else\nfloat distanceToSurface=0.;\n#endif\nvec3 transmittance;vec3 radiance;integrateScatteredRadiance(\nfalse,\natmosphereExposure*lightIntensity,\ntransmittanceLut,\nmultiScatteringLut,\nmultiScatteringIntensity,\ncameraPositionGlobalClampedToTopOfAtmosphere,\nrayDirection,\ndirectionToLight,\n100000000.,\nSkyViewLutSampleCount,\ndistanceToSurface,\nradiance,\ntransmittance);float transparency=1.-avg(transmittance);gl_FragColor=vec4(radiance,transparency);if (distanceToSurface>0.) {gl_FragColor =\napplyAerialPerspectiveRadianceBias(\napplyAerialPerspectiveIntensity(\napplyAerialPerspectiveSaturation(gl_FragColor)));\n#if HAS_DEPTH_TEXTURE\ngl_FragColor.a=depth>=1. ? 1. : gl_FragColor.a;\n#endif\n}\n#endif\n#if OUTPUT_TO_SRGB\ngl_FragColor=toGammaSpace(gl_FragColor);\n#endif\n}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const compositeGlobeAtmospherePixelShader = { name, shader };\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
2
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
3
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/depthFunctions.js";
|
|
5
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export declare const compositeSkyPixelShader: {
|
|
8
|
+
name: string;
|
|
9
|
+
shader: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Do not edit.
|
|
2
|
+
import { ShaderStore } from "@onerjs/core/Engines/shaderStore.js";
|
|
3
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
5
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
6
|
+
import "../Shaders/ShadersInclude/depthFunctions.js";
|
|
7
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
8
|
+
const name = "compositeSkyPixelShader";
|
|
9
|
+
const shader = `precision highp float;precision highp sampler2D;
|
|
10
|
+
#include<__decl__atmosphereFragment>
|
|
11
|
+
#include<helperFunctions>
|
|
12
|
+
#include<depthFunctions>
|
|
13
|
+
#include<atmosphereFunctions>
|
|
14
|
+
varying vec2 uv;varying vec3 positionOnNearPlane;
|
|
15
|
+
#if USE_SKY_VIEW_LUT
|
|
16
|
+
uniform sampler2D skyViewLut;
|
|
17
|
+
#else
|
|
18
|
+
uniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;
|
|
19
|
+
#endif
|
|
20
|
+
void main() {gl_FragColor=vec4(0.);vec3 rayDirection=normalize(positionOnNearPlane);
|
|
21
|
+
#if USE_SKY_VIEW_LUT
|
|
22
|
+
float cosAngleBetweenViewAndZenith;bool isRayIntersectingGround;vec4 skyColor =
|
|
23
|
+
sampleSkyViewLut(
|
|
24
|
+
skyViewLut,
|
|
25
|
+
clampedCameraRadius,
|
|
26
|
+
cameraGeocentricNormal,
|
|
27
|
+
rayDirection,
|
|
28
|
+
directionToLight,
|
|
29
|
+
cosCameraHorizonAngleFromZenith,
|
|
30
|
+
cosAngleBetweenViewAndZenith,
|
|
31
|
+
isRayIntersectingGround);
|
|
32
|
+
#ifndef APPLY_TRANSMITTANCE_BLENDING
|
|
33
|
+
skyColor.a=0.;
|
|
34
|
+
#endif
|
|
35
|
+
gl_FragColor=skyColor;gl_FragColor.a=isRayIntersectingGround ? 1. : gl_FragColor.a;
|
|
36
|
+
#else
|
|
37
|
+
bool intersectsAtmosphere=false;vec3 cameraPositionGlobalClampedToTopOfAtmosphere=vec3(0.);moveToTopAtmosphere(
|
|
38
|
+
clampedCameraPositionGlobal,
|
|
39
|
+
clampedCameraRadius,
|
|
40
|
+
cameraGeocentricNormal,
|
|
41
|
+
rayDirection,
|
|
42
|
+
intersectsAtmosphere,
|
|
43
|
+
cameraPositionGlobalClampedToTopOfAtmosphere);if (!intersectsAtmosphere) {return;}
|
|
44
|
+
vec3 transmittance;vec3 radiance;integrateScatteredRadiance(
|
|
45
|
+
false,
|
|
46
|
+
atmosphereExposure*lightIntensity,
|
|
47
|
+
transmittanceLut,
|
|
48
|
+
multiScatteringLut,
|
|
49
|
+
multiScatteringIntensity,
|
|
50
|
+
cameraPositionGlobalClampedToTopOfAtmosphere,
|
|
51
|
+
rayDirection,
|
|
52
|
+
directionToLight,
|
|
53
|
+
100000000.,
|
|
54
|
+
SkyViewLutSampleCount,
|
|
55
|
+
-1.,
|
|
56
|
+
radiance,
|
|
57
|
+
transmittance);
|
|
58
|
+
#if APPLY_TRANSMITTANCE_BLENDING
|
|
59
|
+
float transparency=1.-avg(transmittance);
|
|
60
|
+
#else
|
|
61
|
+
float transparency=0.;
|
|
62
|
+
#endif
|
|
63
|
+
gl_FragColor=vec4(radiance,transparency);
|
|
64
|
+
#endif
|
|
65
|
+
#if OUTPUT_TO_SRGB
|
|
66
|
+
gl_FragColor=toGammaSpace(gl_FragColor);
|
|
67
|
+
#endif
|
|
68
|
+
}`;
|
|
69
|
+
// Sideeffect
|
|
70
|
+
if (!ShaderStore.ShadersStore[name]) {
|
|
71
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
72
|
+
}
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const compositeSkyPixelShader = { name, shader };
|
|
75
|
+
//# sourceMappingURL=compositeSky.fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compositeSky.fragment.js","sourceRoot":"","sources":["../../../../../dev/addons/src/atmosphere/Shaders/compositeSky.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,4CAAiC;AACvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,gEAAqD;AACrD,OAAO,0CAA0C,CAAC;AAClD,OAAO,+CAA+C,CAAC;AAEvD,MAAM,IAAI,GAAG,yBAAyB,CAAC;AACvC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2Db,CAAC;AACH,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,uBAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"../Shaders/ShadersInclude/atmosphereFragmentDeclaration\";\nimport \"../Shaders/ShadersInclude/atmosphereUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"../Shaders/ShadersInclude/depthFunctions\";\nimport \"../Shaders/ShadersInclude/atmosphereFunctions\";\n\nconst name = \"compositeSkyPixelShader\";\nconst shader = `precision highp float;precision highp sampler2D;\n#include<__decl__atmosphereFragment>\n#include<helperFunctions>\n#include<depthFunctions>\n#include<atmosphereFunctions>\nvarying vec2 uv;varying vec3 positionOnNearPlane;\n#if USE_SKY_VIEW_LUT\nuniform sampler2D skyViewLut;\n#else\nuniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;\n#endif\nvoid main() {gl_FragColor=vec4(0.);vec3 rayDirection=normalize(positionOnNearPlane);\n#if USE_SKY_VIEW_LUT\nfloat cosAngleBetweenViewAndZenith;bool isRayIntersectingGround;vec4 skyColor =\nsampleSkyViewLut(\nskyViewLut,\nclampedCameraRadius,\ncameraGeocentricNormal,\nrayDirection,\ndirectionToLight,\ncosCameraHorizonAngleFromZenith,\ncosAngleBetweenViewAndZenith,\nisRayIntersectingGround);\n#ifndef APPLY_TRANSMITTANCE_BLENDING\nskyColor.a=0.;\n#endif\ngl_FragColor=skyColor;gl_FragColor.a=isRayIntersectingGround ? 1. : gl_FragColor.a;\n#else\nbool intersectsAtmosphere=false;vec3 cameraPositionGlobalClampedToTopOfAtmosphere=vec3(0.);moveToTopAtmosphere(\nclampedCameraPositionGlobal,\nclampedCameraRadius,\ncameraGeocentricNormal,\nrayDirection,\nintersectsAtmosphere,\ncameraPositionGlobalClampedToTopOfAtmosphere);if (!intersectsAtmosphere) {return;}\nvec3 transmittance;vec3 radiance;integrateScatteredRadiance(\nfalse,\natmosphereExposure*lightIntensity,\ntransmittanceLut,\nmultiScatteringLut,\nmultiScatteringIntensity,\ncameraPositionGlobalClampedToTopOfAtmosphere,\nrayDirection,\ndirectionToLight,\n100000000.,\nSkyViewLutSampleCount,\n-1.,\nradiance,\ntransmittance);\n#if APPLY_TRANSMITTANCE_BLENDING\nfloat transparency=1.-avg(transmittance);\n#else\nfloat transparency=0.;\n#endif\ngl_FragColor=vec4(radiance,transparency);\n#endif\n#if OUTPUT_TO_SRGB\ngl_FragColor=toGammaSpace(gl_FragColor);\n#endif\n}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const compositeSkyPixelShader = { name, shader };\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
2
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
3
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/depthFunctions.js";
|
|
5
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
6
|
+
import "@onerjs/core/Shaders/ShadersInclude/importanceSampling.js";
|
|
7
|
+
import "@onerjs/core/Shaders/ShadersInclude/pbrBRDFFunctions.js";
|
|
8
|
+
import "@onerjs/core/Shaders/ShadersInclude/hdrFilteringFunctions.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const diffuseSkyIrradiancePixelShader: {
|
|
11
|
+
name: string;
|
|
12
|
+
shader: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Do not edit.
|
|
2
|
+
import { ShaderStore } from "@onerjs/core/Engines/shaderStore.js";
|
|
3
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
5
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
6
|
+
import "../Shaders/ShadersInclude/depthFunctions.js";
|
|
7
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
8
|
+
import "@onerjs/core/Shaders/ShadersInclude/importanceSampling.js";
|
|
9
|
+
import "@onerjs/core/Shaders/ShadersInclude/pbrBRDFFunctions.js";
|
|
10
|
+
import "@onerjs/core/Shaders/ShadersInclude/hdrFilteringFunctions.js";
|
|
11
|
+
const name = "diffuseSkyIrradiancePixelShader";
|
|
12
|
+
const shader = `precision highp float;const float DiffuseSkyIrradianceLutSampleCount=32.0;
|
|
13
|
+
#include<__decl__atmosphereFragment>
|
|
14
|
+
#include<helperFunctions>
|
|
15
|
+
#include<depthFunctions>
|
|
16
|
+
#include<atmosphereFunctions>
|
|
17
|
+
uniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;vec3 integrateForIrradiance(vec3 directionToLight,vec3 rayDirection,vec3 rayOrigin) {vec3 radiance;vec3 transmittance;integrateScatteredRadiance(
|
|
18
|
+
false,
|
|
19
|
+
1.,
|
|
20
|
+
transmittanceLut,
|
|
21
|
+
multiScatteringLut,
|
|
22
|
+
multiScatteringIntensity,
|
|
23
|
+
rayOrigin,
|
|
24
|
+
rayDirection.xzy,
|
|
25
|
+
directionToLight.xzy,
|
|
26
|
+
100000000.,
|
|
27
|
+
DiffuseSkyIrradianceLutSampleCount,
|
|
28
|
+
-1.,
|
|
29
|
+
radiance,
|
|
30
|
+
transmittance);return radiance;}
|
|
31
|
+
#include<importanceSampling>
|
|
32
|
+
#include<pbrBRDFFunctions>
|
|
33
|
+
#include<hdrFilteringFunctions>
|
|
34
|
+
varying vec2 uv;void main() {vec2 unit=uvToUnit(uv,DiffuseSkyIrradianceLutDomainInUVSpace,DiffuseSkyIrradianceLutHalfTexelSize);float cosLightInclination=2.*unit.x-1.;float sinLightInclination=sqrtClamped(1.-cosLightInclination*cosLightInclination);vec3 directionToLight=normalize(vec3(0.,cosLightInclination,sinLightInclination));float radius=max(planetRadiusWithOffset,unit.y*atmosphereThickness+planetRadius);vec3 swappedDirectionToLight=vec3(directionToLight.x,directionToLight.z,directionToLight.y);
|
|
35
|
+
vec3 irradiance =
|
|
36
|
+
PI *
|
|
37
|
+
irradiance(
|
|
38
|
+
swappedDirectionToLight,
|
|
39
|
+
vec2(radius,0.),
|
|
40
|
+
1.,
|
|
41
|
+
vec3(1.),
|
|
42
|
+
vec3(1.));float averageIrradiance=getLuminance(irradiance);vec3 newIrradiance=mix(irradiance,vec3(averageIrradiance),diffuseSkyIrradianceDesaturationFactor);float newIrradianceScale=getLuminance(newIrradiance);float rescaling=averageIrradiance/max(0.000001,newIrradianceScale);irradiance=newIrradiance*rescaling;gl_FragColor=vec4(irradiance,1.);}`;
|
|
43
|
+
// Sideeffect
|
|
44
|
+
if (!ShaderStore.ShadersStore[name]) {
|
|
45
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
46
|
+
}
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const diffuseSkyIrradiancePixelShader = { name, shader };
|
|
49
|
+
//# sourceMappingURL=diffuseSkyIrradiance.fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diffuseSkyIrradiance.fragment.js","sourceRoot":"","sources":["../../../../../dev/addons/src/atmosphere/Shaders/diffuseSkyIrradiance.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,4CAAiC;AACvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,gEAAqD;AACrD,OAAO,0CAA0C,CAAC;AAClD,OAAO,+CAA+C,CAAC;AACvD,mEAAwD;AACxD,iEAAsD;AACtD,sEAA2D;AAE3D,MAAM,IAAI,GAAG,iCAAiC,CAAC;AAC/C,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2VA8B4U,CAAC;AAC5V,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,+BAA+B,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"../Shaders/ShadersInclude/atmosphereFragmentDeclaration\";\nimport \"../Shaders/ShadersInclude/atmosphereUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"../Shaders/ShadersInclude/depthFunctions\";\nimport \"../Shaders/ShadersInclude/atmosphereFunctions\";\nimport \"core/Shaders/ShadersInclude/importanceSampling\";\nimport \"core/Shaders/ShadersInclude/pbrBRDFFunctions\";\nimport \"core/Shaders/ShadersInclude/hdrFilteringFunctions\";\n\nconst name = \"diffuseSkyIrradiancePixelShader\";\nconst shader = `precision highp float;const float DiffuseSkyIrradianceLutSampleCount=32.0;\n#include<__decl__atmosphereFragment>\n#include<helperFunctions>\n#include<depthFunctions>\n#include<atmosphereFunctions>\nuniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;vec3 integrateForIrradiance(vec3 directionToLight,vec3 rayDirection,vec3 rayOrigin) {vec3 radiance;vec3 transmittance;integrateScatteredRadiance(\nfalse,\n1.,\ntransmittanceLut,\nmultiScatteringLut,\nmultiScatteringIntensity,\nrayOrigin,\nrayDirection.xzy,\ndirectionToLight.xzy,\n100000000.,\nDiffuseSkyIrradianceLutSampleCount,\n-1.,\nradiance,\ntransmittance);return radiance;}\n#include<importanceSampling>\n#include<pbrBRDFFunctions>\n#include<hdrFilteringFunctions>\nvarying vec2 uv;void main() {vec2 unit=uvToUnit(uv,DiffuseSkyIrradianceLutDomainInUVSpace,DiffuseSkyIrradianceLutHalfTexelSize);float cosLightInclination=2.*unit.x-1.;float sinLightInclination=sqrtClamped(1.-cosLightInclination*cosLightInclination);vec3 directionToLight=normalize(vec3(0.,cosLightInclination,sinLightInclination));float radius=max(planetRadiusWithOffset,unit.y*atmosphereThickness+planetRadius);vec3 swappedDirectionToLight=vec3(directionToLight.x,directionToLight.z,directionToLight.y); \nvec3 irradiance =\nPI *\nirradiance(\nswappedDirectionToLight,\nvec2(radius,0.),\n1.,\nvec3(1.),\nvec3(1.));float averageIrradiance=getLuminance(irradiance);vec3 newIrradiance=mix(irradiance,vec3(averageIrradiance),diffuseSkyIrradianceDesaturationFactor);float newIrradianceScale=getLuminance(newIrradiance);float rescaling=averageIrradiance/max(0.000001,newIrradianceScale);irradiance=newIrradiance*rescaling;gl_FragColor=vec4(irradiance,1.);}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const diffuseSkyIrradiancePixelShader = { name, shader };\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Do not edit.
|
|
2
|
+
import { ShaderStore } from "@onerjs/core/Engines/shaderStore.js";
|
|
3
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
5
|
+
const name = "fullscreenTriangleVertexShader";
|
|
6
|
+
const shader = `precision highp float;
|
|
7
|
+
#include<__decl__atmosphereFragment>
|
|
8
|
+
#if POSITION_VEC2
|
|
9
|
+
attribute vec2 position;
|
|
10
|
+
#else
|
|
11
|
+
attribute vec3 position;
|
|
12
|
+
#endif
|
|
13
|
+
uniform float depth;varying vec2 uv;
|
|
14
|
+
#if COMPUTE_WORLD_RAY
|
|
15
|
+
varying vec3 positionOnNearPlane;
|
|
16
|
+
#endif
|
|
17
|
+
#if COMPUTE_WORLD_RAY
|
|
18
|
+
const float nearPlaneNDC=-1.;
|
|
19
|
+
#endif
|
|
20
|
+
void main() {gl_Position=vec4(position.xy,depth,1.);uv=0.5*position.xy+vec2(0.5);
|
|
21
|
+
#if COMPUTE_WORLD_RAY
|
|
22
|
+
positionOnNearPlane=(inverseViewProjectionWithoutTranslation*vec4(position.xy,nearPlaneNDC,1.)).xyz;
|
|
23
|
+
#endif
|
|
24
|
+
}`;
|
|
25
|
+
// Sideeffect
|
|
26
|
+
if (!ShaderStore.ShadersStore[name]) {
|
|
27
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const fullscreenTriangleVertexShader = { name, shader };
|
|
31
|
+
//# sourceMappingURL=fullscreenTriangle.vertex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreenTriangle.vertex.js","sourceRoot":"","sources":["../../../../../dev/addons/src/atmosphere/Shaders/fullscreenTriangle.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,4CAAiC;AACvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAE5D,MAAM,IAAI,GAAG,gCAAgC,CAAC;AAC9C,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;EAkBb,CAAC;AACH,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,8BAA8B,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"../Shaders/ShadersInclude/atmosphereFragmentDeclaration\";\nimport \"../Shaders/ShadersInclude/atmosphereUboDeclaration\";\n\nconst name = \"fullscreenTriangleVertexShader\";\nconst shader = `precision highp float;\n#include<__decl__atmosphereFragment>\n#if POSITION_VEC2\nattribute vec2 position;\n#else\nattribute vec3 position;\n#endif\nuniform float depth;varying vec2 uv;\n#if COMPUTE_WORLD_RAY\nvarying vec3 positionOnNearPlane;\n#endif\n#if COMPUTE_WORLD_RAY\nconst float nearPlaneNDC=-1.;\n#endif\nvoid main() {gl_Position=vec4(position.xy,depth,1.);uv=0.5*position.xy+vec2(0.5);\n#if COMPUTE_WORLD_RAY\npositionOnNearPlane=(inverseViewProjectionWithoutTranslation*vec4(position.xy,nearPlaneNDC,1.)).xyz;\n#endif\n}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const fullscreenTriangleVertexShader = { name, shader };\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
2
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
3
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const multiScatteringPixelShader: {
|
|
7
|
+
name: string;
|
|
8
|
+
shader: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Do not edit.
|
|
2
|
+
import { ShaderStore } from "@onerjs/core/Engines/shaderStore.js";
|
|
3
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
5
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
6
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
7
|
+
const name = "multiScatteringPixelShader";
|
|
8
|
+
const shader = `#define RENDER_MULTI_SCATTERING 1
|
|
9
|
+
precision highp float;
|
|
10
|
+
#define COMPUTE_MULTI_SCATTERING 1
|
|
11
|
+
#include<__decl__atmosphereFragment>
|
|
12
|
+
#include<helperFunctions>
|
|
13
|
+
#include<atmosphereFunctions>
|
|
14
|
+
varying vec2 uv;uniform sampler2D transmittanceLut;void main() {gl_FragColor=renderMultiScattering(uv,transmittanceLut);}`;
|
|
15
|
+
// Sideeffect
|
|
16
|
+
if (!ShaderStore.ShadersStore[name]) {
|
|
17
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
18
|
+
}
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const multiScatteringPixelShader = { name, shader };
|
|
21
|
+
//# sourceMappingURL=multiScattering.fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiScattering.fragment.js","sourceRoot":"","sources":["../../../../../dev/addons/src/atmosphere/Shaders/multiScattering.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,4CAAiC;AACvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,gEAAqD;AACrD,OAAO,+CAA+C,CAAC;AAEvD,MAAM,IAAI,GAAG,4BAA4B,CAAC;AAC1C,MAAM,MAAM,GAAG;;;;;;0HAM2G,CAAC;AAC3H,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,0BAA0B,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"../Shaders/ShadersInclude/atmosphereFragmentDeclaration\";\nimport \"../Shaders/ShadersInclude/atmosphereUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"../Shaders/ShadersInclude/atmosphereFunctions\";\n\nconst name = \"multiScatteringPixelShader\";\nconst shader = `#define RENDER_MULTI_SCATTERING 1\nprecision highp float;\n#define COMPUTE_MULTI_SCATTERING 1\n#include<__decl__atmosphereFragment>\n#include<helperFunctions>\n#include<atmosphereFunctions>\nvarying vec2 uv;uniform sampler2D transmittanceLut;void main() {gl_FragColor=renderMultiScattering(uv,transmittanceLut);}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const multiScatteringPixelShader = { name, shader };\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
2
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
3
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const skyViewPixelShader: {
|
|
7
|
+
name: string;
|
|
8
|
+
shader: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Do not edit.
|
|
2
|
+
import { ShaderStore } from "@onerjs/core/Engines/shaderStore.js";
|
|
3
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
5
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
6
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
7
|
+
const name = "skyViewPixelShader";
|
|
8
|
+
const shader = `#define RENDER_SKY_VIEW 1
|
|
9
|
+
precision highp float;precision highp sampler2D;
|
|
10
|
+
#include<__decl__atmosphereFragment>
|
|
11
|
+
#include<helperFunctions>
|
|
12
|
+
#include<atmosphereFunctions>
|
|
13
|
+
varying vec2 uv;uniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;void main() {gl_FragColor=renderSkyView(uv,transmittanceLut,multiScatteringLut);}`;
|
|
14
|
+
// Sideeffect
|
|
15
|
+
if (!ShaderStore.ShadersStore[name]) {
|
|
16
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const skyViewPixelShader = { name, shader };
|
|
20
|
+
//# sourceMappingURL=skyView.fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skyView.fragment.js","sourceRoot":"","sources":["../../../../../dev/addons/src/atmosphere/Shaders/skyView.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,4CAAiC;AACvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,gEAAqD;AACrD,OAAO,+CAA+C,CAAC;AAEvD,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,MAAM,GAAG;;;;;0KAK2J,CAAC;AAC3K,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 \"core/Engines/shaderStore\";\nimport \"../Shaders/ShadersInclude/atmosphereFragmentDeclaration\";\nimport \"../Shaders/ShadersInclude/atmosphereUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"../Shaders/ShadersInclude/atmosphereFunctions\";\n\nconst name = \"skyViewPixelShader\";\nconst shader = `#define RENDER_SKY_VIEW 1\nprecision highp float;precision highp sampler2D;\n#include<__decl__atmosphereFragment>\n#include<helperFunctions>\n#include<atmosphereFunctions>\nvarying vec2 uv;uniform sampler2D transmittanceLut;uniform sampler2D multiScatteringLut;void main() {gl_FragColor=renderSkyView(uv,transmittanceLut,multiScatteringLut);}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const skyViewPixelShader = { name, shader };\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
2
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
3
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const transmittancePixelShader: {
|
|
7
|
+
name: string;
|
|
8
|
+
shader: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Do not edit.
|
|
2
|
+
import { ShaderStore } from "@onerjs/core/Engines/shaderStore.js";
|
|
3
|
+
import "../Shaders/ShadersInclude/atmosphereFragmentDeclaration.js";
|
|
4
|
+
import "../Shaders/ShadersInclude/atmosphereUboDeclaration.js";
|
|
5
|
+
import "@onerjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
6
|
+
import "../Shaders/ShadersInclude/atmosphereFunctions.js";
|
|
7
|
+
const name = "transmittancePixelShader";
|
|
8
|
+
const shader = `#define RENDER_TRANSMITTANCE 1
|
|
9
|
+
precision highp float;
|
|
10
|
+
#include<__decl__atmosphereFragment>
|
|
11
|
+
#include<helperFunctions>
|
|
12
|
+
#include<atmosphereFunctions>
|
|
13
|
+
varying vec2 uv;void main() {gl_FragColor=renderTransmittance(uv);}`;
|
|
14
|
+
// Sideeffect
|
|
15
|
+
if (!ShaderStore.ShadersStore[name]) {
|
|
16
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const transmittancePixelShader = { name, shader };
|
|
20
|
+
//# sourceMappingURL=transmittance.fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transmittance.fragment.js","sourceRoot":"","sources":["../../../../../dev/addons/src/atmosphere/Shaders/transmittance.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,4CAAiC;AACvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,gEAAqD;AACrD,OAAO,+CAA+C,CAAC;AAEvD,MAAM,IAAI,GAAG,0BAA0B,CAAC;AACxC,MAAM,MAAM,GAAG;;;;;oEAKqD,CAAC;AACrE,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,wBAAwB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"../Shaders/ShadersInclude/atmosphereFragmentDeclaration\";\nimport \"../Shaders/ShadersInclude/atmosphereUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"../Shaders/ShadersInclude/atmosphereFunctions\";\n\nconst name = \"transmittancePixelShader\";\nconst shader = `#define RENDER_TRANSMITTANCE 1\nprecision highp float;\n#include<__decl__atmosphereFragment>\n#include<helperFunctions>\n#include<atmosphereFunctions>\nvarying vec2 uv;void main() {gl_FragColor=renderTransmittance(uv);}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const transmittancePixelShader = { name, shader };\n"]}
|