@shapediver/viewer.rendering-engine.rendering-engine-threejs 3.6.0 → 3.7.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/dist/RenderingEngine.d.ts +1 -0
- package/dist/RenderingEngine.d.ts.map +1 -1
- package/dist/RenderingEngine.js +8 -4
- package/dist/RenderingEngine.js.map +1 -1
- package/dist/injectors/Tag3dGeometryCreationInjector.d.ts.map +1 -1
- package/dist/injectors/Tag3dGeometryCreationInjector.js +32 -18
- package/dist/injectors/Tag3dGeometryCreationInjector.js.map +1 -1
- package/dist/loaders/EnvironmentMapLoader.js +1 -1
- package/dist/loaders/EnvironmentMapLoader.js.map +1 -1
- package/dist/loaders/LightLoader.js +7 -7
- package/dist/loaders/LightLoader.js.map +1 -1
- package/dist/loaders/MaterialLoader.d.ts +1 -1
- package/dist/managers/EnvironmentGeometryManager.js +2 -2
- package/dist/managers/EnvironmentGeometryManager.js.map +1 -1
- package/dist/managers/PostProcessingManager.d.ts +4 -1
- package/dist/managers/PostProcessingManager.d.ts.map +1 -1
- package/dist/managers/PostProcessingManager.js +22 -6
- package/dist/managers/PostProcessingManager.js.map +1 -1
- package/dist/managers/RenderingManager.d.ts.map +1 -1
- package/dist/managers/RenderingManager.js +0 -1
- package/dist/managers/RenderingManager.js.map +1 -1
- package/dist/managers/postprocessing/ao/ao/shader/ao_compose.d.ts +1 -1
- package/dist/managers/postprocessing/ao/ao/shader/ao_compose.d.ts.map +1 -1
- package/dist/managers/postprocessing/ao/ao/shader/ao_compose.js +2 -2
- package/dist/managers/postprocessing/ao/ao/shader/ao_compose.js.map +1 -1
- package/dist/managers/postprocessing/ao/ao/shader/ao_utils.d.ts +2 -0
- package/dist/managers/postprocessing/ao/ao/shader/ao_utils.d.ts.map +1 -0
- package/dist/managers/postprocessing/ao/ao/shader/ao_utils.js +86 -0
- package/dist/managers/postprocessing/ao/ao/shader/ao_utils.js.map +1 -0
- package/dist/managers/postprocessing/ao/hbao/HBAOEffect.js +2 -2
- package/dist/managers/postprocessing/ao/hbao/HBAOEffect.js.map +1 -1
- package/dist/managers/postprocessing/ao/hbao/shader/hbao.d.ts +1 -1
- package/dist/managers/postprocessing/ao/hbao/shader/hbao.d.ts.map +1 -1
- package/dist/managers/postprocessing/ao/hbao/shader/hbao.js +100 -43
- package/dist/managers/postprocessing/ao/hbao/shader/hbao.js.map +1 -1
- package/dist/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.d.ts +1 -1
- package/dist/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.d.ts.map +1 -1
- package/dist/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.js +6 -4
- package/dist/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.js.map +1 -1
- package/dist/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.d.ts +1 -1
- package/dist/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.d.ts.map +1 -1
- package/dist/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.js +67 -41
- package/dist/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.js.map +1 -1
- package/dist/managers/postprocessing/ao/ssao/SSAOEffect.d.ts.map +1 -1
- package/dist/managers/postprocessing/ao/ssao/SSAOEffect.js +3 -1
- package/dist/managers/postprocessing/ao/ssao/SSAOEffect.js.map +1 -1
- package/dist/managers/postprocessing/ao/ssao/shader/ssao.d.ts +1 -1
- package/dist/managers/postprocessing/ao/ssao/shader/ssao.d.ts.map +1 -1
- package/dist/managers/postprocessing/ao/ssao/shader/ssao.js +38 -52
- package/dist/managers/postprocessing/ao/ssao/shader/ssao.js.map +1 -1
- package/dist/managers/postprocessing/ao/utils/shader/basic.d.ts +1 -1
- package/dist/managers/postprocessing/ao/utils/shader/basic.d.ts.map +1 -1
- package/dist/managers/postprocessing/ao/utils/shader/basic.js +3 -0
- package/dist/managers/postprocessing/ao/utils/shader/basic.js.map +1 -1
- package/package.json +17 -17
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ao_utils = void 0;
|
|
4
|
+
exports.ao_utils = `
|
|
5
|
+
uniform mat4 projectionMatrixInverse;
|
|
6
|
+
uniform sampler2D normalTexture;
|
|
7
|
+
|
|
8
|
+
in mat4 viewMatrixInverse;
|
|
9
|
+
|
|
10
|
+
vec3 computeWorldPosition(float depth, vec2 coord) {
|
|
11
|
+
// Convert screen coordinates to normalized device coordinates (NDC)
|
|
12
|
+
vec2 ndc = coord * 2.0 - 1.0;
|
|
13
|
+
|
|
14
|
+
// Convert depth to clip space z
|
|
15
|
+
float z = depth * 2.0 - 1.0;
|
|
16
|
+
|
|
17
|
+
// Create clip space position
|
|
18
|
+
vec4 clipSpacePosition = vec4(ndc, z, 1.0);
|
|
19
|
+
|
|
20
|
+
// Transform to view space
|
|
21
|
+
vec4 viewSpacePosition = projectionMatrixInverse * clipSpacePosition;
|
|
22
|
+
|
|
23
|
+
// Perspective division
|
|
24
|
+
viewSpacePosition /= viewSpacePosition.w;
|
|
25
|
+
|
|
26
|
+
// Transform to world space using the full inverse view matrix
|
|
27
|
+
vec4 worldSpacePosition = viewMatrixInverse * viewSpacePosition;
|
|
28
|
+
|
|
29
|
+
return worldSpacePosition.xyz;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
vec3 computeNormal(vec2 vUv) {
|
|
33
|
+
vec2 size = vec2(textureSize(depthTexture, 0));
|
|
34
|
+
ivec2 p = ivec2(vUv * size);
|
|
35
|
+
float c0 = texelFetch(depthTexture, p, 0).x;
|
|
36
|
+
float l2 = texelFetch(depthTexture, p - ivec2(2, 0), 0).x;
|
|
37
|
+
float l1 = texelFetch(depthTexture, p - ivec2(1, 0), 0).x;
|
|
38
|
+
float r1 = texelFetch(depthTexture, p + ivec2(1, 0), 0).x;
|
|
39
|
+
float r2 = texelFetch(depthTexture, p + ivec2(2, 0), 0).x;
|
|
40
|
+
float b2 = texelFetch(depthTexture, p - ivec2(0, 2), 0).x;
|
|
41
|
+
float b1 = texelFetch(depthTexture, p - ivec2(0, 1), 0).x;
|
|
42
|
+
float t1 = texelFetch(depthTexture, p + ivec2(0, 1), 0).x;
|
|
43
|
+
float t2 = texelFetch(depthTexture, p + ivec2(0, 2), 0).x;
|
|
44
|
+
float dl = abs((2.0 * l1 - l2) - c0);
|
|
45
|
+
float dr = abs((2.0 * r1 - r2) - c0);
|
|
46
|
+
float db = abs((2.0 * b1 - b2) - c0);
|
|
47
|
+
float dt = abs((2.0 * t1 - t2) - c0);
|
|
48
|
+
vec3 ce = computeWorldPosition(c0, vUv).xyz;
|
|
49
|
+
vec3 dpdx = (dl < dr) ? ce - computeWorldPosition(l1, (vUv - vec2(1.0 / size.x, 0.0))).xyz
|
|
50
|
+
: -ce + computeWorldPosition(r1, (vUv + vec2(1.0 / size.x, 0.0))).xyz;
|
|
51
|
+
vec3 dpdy = (db < dt) ? ce - computeWorldPosition(b1, (vUv - vec2(0.0, 1.0 / size.y))).xyz
|
|
52
|
+
: -ce + computeWorldPosition(t1, (vUv + vec2(0.0, 1.0 / size.y))).xyz;
|
|
53
|
+
return normalize(cross(dpdx, dpdy));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
bool areDepthsOnSamePlane(
|
|
57
|
+
float depth1,
|
|
58
|
+
float depth2,
|
|
59
|
+
vec2 coord1,
|
|
60
|
+
vec2 coord2,
|
|
61
|
+
vec3 planeNormalScreenSpace,
|
|
62
|
+
float epsilon
|
|
63
|
+
) {
|
|
64
|
+
// Reconstruct world positions
|
|
65
|
+
vec3 worldPos1 = computeWorldPosition(depth1, coord1);
|
|
66
|
+
vec3 worldPos2 = computeWorldPosition(depth2, coord2);
|
|
67
|
+
|
|
68
|
+
// Compute the vector between the two positions
|
|
69
|
+
vec3 pointVector = worldPos2 - worldPos1;
|
|
70
|
+
|
|
71
|
+
if (length(pointVector) < 1e-6) {
|
|
72
|
+
return true; // Indicates invalid inputs
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Compute the normal in world space
|
|
76
|
+
vec3 planeNormal = mat3(viewMatrixInverse) * planeNormalScreenSpace;
|
|
77
|
+
|
|
78
|
+
// Check if the vector is orthogonal to the plane normal
|
|
79
|
+
return abs(dot(pointVector, planeNormal)) < epsilon;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
vec3 getUnpackedNormal(vec2 uv) {
|
|
83
|
+
return normalize(textureLod(normalTexture, uv, 0.).xyz * 2.0 - 1.0);
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
//# sourceMappingURL=ao_utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ao_utils.js","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/ao/shader/ao_utils.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFvB,CAAC"}
|
|
@@ -4,8 +4,8 @@ exports.HBAOEffect = void 0;
|
|
|
4
4
|
const AOEffect_1 = require("../ao/AOEffect");
|
|
5
5
|
const AOPass_1 = require("../ao/AOPass");
|
|
6
6
|
const hbao_1 = require("./shader/hbao");
|
|
7
|
-
const
|
|
8
|
-
const finalFragmentShader = hbao_1.hbao.replace('#include <
|
|
7
|
+
const ao_utils_1 = require("../ao/shader/ao_utils");
|
|
8
|
+
const finalFragmentShader = hbao_1.hbao.replace('#include <ao_utils>', ao_utils_1.ao_utils);
|
|
9
9
|
class HBAOPass extends AOPass_1.AOPass {
|
|
10
10
|
// #region Constructors (1)
|
|
11
11
|
constructor(camera, scene) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HBAOEffect.js","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/hbao/HBAOEffect.ts"],"names":[],"mappings":";;;AAEA,6CAA0C;AAE1C,yCAAsC;AACtC,wCAAuD;AACvD,oDAAiD;AAEjD,MAAM,mBAAmB,GAAG,WAAc,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"HBAOEffect.js","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/hbao/HBAOEffect.ts"],"names":[],"mappings":";;;AAEA,6CAA0C;AAE1C,yCAAsC;AACtC,wCAAuD;AACvD,oDAAiD;AAEjD,MAAM,mBAAmB,GAAG,WAAc,CAAC,OAAO,CAAC,qBAAqB,EAAE,mBAAQ,CAAC,CAAC;AAEpF,MAAM,QAAS,SAAQ,eAAM;IAC5B,2BAA2B;IAE3B,YAAY,MAAc,EAAE,KAAY;QACvC,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC;IAC3C,CAAC;CAGD;AAED,MAAM,UAAW,SAAQ,mBAAQ;IAKhC,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,QAAwB,EAAE,MAAc,EAAE,KAAY,EAAE,UAAsC,mBAAQ,CAAC,cAAc;QAChI,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,gDACtD,mBAAQ,CAAC,cAAc,GACvB,UAAU,CAAC,cAAc,GACzB,OAAO,EACT,CAAC;QAbJ,yBAAyB;QAElB,aAAQ,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;IAY9D,CAAC;CAGD;AAEQ,gCAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const hbao = "\nvarying vec2 vUv;\n\nuniform highp sampler2D depthTexture;\n\nuniform mat4 projectionViewMatrix;\nuniform int frame;\n\nuniform sampler2D blueNoiseTexture;\nuniform vec2 blueNoiseRepeat;\nuniform vec2 texSize;\n\nuniform float aoDistance;\nuniform float distancePower;\nuniform float bias;\nuniform float thickness;\n\n#include <packing>\n
|
|
1
|
+
export declare const hbao = "\n#define PI 3.14159265358979323846264338327950288\n\nvarying vec2 vUv;\n\nuniform highp sampler2D depthTexture;\n\nuniform mat4 projectionViewMatrix;\nuniform int frame;\n\nuniform sampler2D blueNoiseTexture;\nuniform vec2 blueNoiseRepeat;\nuniform vec2 texSize;\n\nuniform float aoDistance;\nuniform float distancePower;\nuniform float bias;\nuniform float thickness;\n\n#include <packing>\n#include <sampleBlueNoise>\n\nuniform float cameraNear;\nuniform float cameraFar;\nuniform mat4 cameraMatrixWorld;\n\n#include <ao_utils>\n\n// source: https://github.com/mrdoob/three.js/blob/342946c8392639028da439b6dc0597e58209c696/examples/js/shaders/SAOShader.js#L123\nfloat getViewZ(const float depth) {\n#ifdef PERSPECTIVE_CAMERA\n return perspectiveDepthToViewZ(depth, cameraNear, cameraFar);\n#else\n return orthographicDepthToViewZ(depth, cameraNear, cameraFar);\n#endif\n}\n\nvec3 slerp(const vec3 a, const vec3 b, const float t) {\n float cosAngle = dot(a, b);\n float angle = acos(cosAngle);\n\n if (abs(angle) < 0.001) {\n return mix(a, b, t);\n }\n\n float sinAngle = sin(angle);\n float t1 = sin((1.0 - t) * angle) / sinAngle;\n float t2 = sin(t * angle) / sinAngle;\n\n return (a * t1) + (b * t2);\n}\n\n// source: https://www.shadertoy.com/view/cll3R4\nvec3 cosineSampleHemisphere(const vec3 n, const vec2 u) {\n float r = sqrt(u.x);\n float theta = 2.0 * PI * u.y;\n\n vec3 b = normalize(cross(n, vec3(0.0, 1.0, 1.0)));\n vec3 t = cross(b, n);\n\n return normalize(r * sin(theta) * b + sqrt(1.0 - u.x) * n + r * cos(theta) * t);\n}\n\nvoid main() {\n float depth = textureLod(depthTexture, vUv, 0.0).r;\n vec3 normal = computeNormal(vUv);\n\n // filter out background\n if (depth == 1.0) {\n gl_FragColor = vec4(normal, 1.0);\n return;\n }\n\n vec4 cameraPosition = cameraMatrixWorld * vec4(0.0, 0.0, 0.0, 1.0);\n\n vec3 worldPos = computeWorldPosition(depth, vUv);\n vec3 screenSpaceNormal = getUnpackedNormal(vUv);\n\n float ao = 0.0, totalWeight = 0.0;\n\n for (int i = 0; i < spp; i++) {\n int seed = i;\n #ifdef animatedNoise\n seed += frame;\n #endif\n\n vec4 blueNoise = sampleBlueNoise(blueNoiseTexture, seed, blueNoiseRepeat, texSize);\n\n vec3 sampleWorldDir = cosineSampleHemisphere(normal, blueNoise.rg);\n\n vec3 sampleWorldPos = worldPos + aoDistance * pow(blueNoise.b, distancePower + 1.0) * sampleWorldDir;\n\n // Project the sample position to screen space\n vec4 sampleUv = projectionViewMatrix * vec4(sampleWorldPos, 1.);\n sampleUv.xy /= sampleUv.w;\n sampleUv.xy = sampleUv.xy * 0.5 + 0.5;\n\n // Get the depth of the sample position\n float sampleDepth = textureLod(depthTexture, sampleUv.xy, 0.0).r;\n\n if(sampleDepth < 1.0) {\n vec3 sampleNormal = getUnpackedNormal(sampleUv.xy);\n\n // Compute the horizon line\n float deltaDepth = depth - sampleDepth;\n\n // distance based bias\n float d = distance(sampleWorldPos, cameraPosition.xyz) / aoDistance;\n deltaDepth *= 0.001 * d * d;\n\n float th = thickness * 0.01;\n\n float theta = dot(normal, sampleWorldDir);\n totalWeight += theta;\n\n if (deltaDepth < th) {\n\n\n float horizon = sampleDepth + deltaDepth * bias * 1000.;\n\n float occlusion = max(0.0, horizon - depth) * theta;\n\n float m = max(0., 1. - deltaDepth / th);\n occlusion = 10. * occlusion * m / d;\n\n occlusion = max(0.0, occlusion);\n \n // check if the normals are in the same direction\n float dotProduct = dot(screenSpaceNormal, sampleNormal);\n if (dotProduct < 0.9999) {\n \n occlusion = sqrt(occlusion);\n ao += occlusion;\n } else {\n if(areDepthsOnSamePlane(depth, sampleDepth, vUv, sampleUv.xy, screenSpaceNormal, 0.1)) {\n // occluded += 0.0;\n // totalWeight += 1.0;\n } else {\n \n occlusion = sqrt(occlusion);\n ao += occlusion;\n }\n }\n }\n }\n }\n\n if (totalWeight > 0.) ao /= totalWeight;\n\n // clamp ao to [0, 1]\n ao = clamp(1. - ao, 0., 1.);\n\n gl_FragColor = vec4(normal, ao);\n}\n";
|
|
2
2
|
//# sourceMappingURL=hbao.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hbao.d.ts","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/hbao/shader/hbao.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"hbao.d.ts","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/hbao/shader/hbao.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,s/IA0JhB,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.hbao = void 0;
|
|
4
4
|
exports.hbao = `
|
|
5
|
+
#define PI 3.14159265358979323846264338327950288
|
|
6
|
+
|
|
5
7
|
varying vec2 vUv;
|
|
6
8
|
|
|
7
9
|
uniform highp sampler2D depthTexture;
|
|
@@ -19,76 +21,131 @@ uniform float bias;
|
|
|
19
21
|
uniform float thickness;
|
|
20
22
|
|
|
21
23
|
#include <packing>
|
|
22
|
-
|
|
23
|
-
#include <hbao_utils>
|
|
24
|
-
|
|
25
|
-
float getOcclusion(const vec3 cameraPosition, const vec3 worldPos, const vec3 worldNormal, const float depth, const int seed, inout float totalWeight) {
|
|
26
|
-
vec4 blueNoise = sampleBlueNoise(blueNoiseTexture, seed, blueNoiseRepeat, texSize);
|
|
27
|
-
|
|
28
|
-
vec3 sampleWorldDir = cosineSampleHemisphere(worldNormal, blueNoise.rg);
|
|
29
|
-
|
|
30
|
-
vec3 sampleWorldPos = worldPos + aoDistance * pow(blueNoise.b, distancePower + 1.0) * sampleWorldDir;
|
|
24
|
+
#include <sampleBlueNoise>
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
sampleUv.xy = sampleUv.xy * 0.5 + 0.5;
|
|
26
|
+
uniform float cameraNear;
|
|
27
|
+
uniform float cameraFar;
|
|
28
|
+
uniform mat4 cameraMatrixWorld;
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
float sampleDepth = textureLod(depthTexture, sampleUv.xy, 0.0).r;
|
|
30
|
+
#include <ao_utils>
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
// source: https://github.com/mrdoob/three.js/blob/342946c8392639028da439b6dc0597e58209c696/examples/js/shaders/SAOShader.js#L123
|
|
33
|
+
float getViewZ(const float depth) {
|
|
34
|
+
#ifdef PERSPECTIVE_CAMERA
|
|
35
|
+
return perspectiveDepthToViewZ(depth, cameraNear, cameraFar);
|
|
36
|
+
#else
|
|
37
|
+
return orthographicDepthToViewZ(depth, cameraNear, cameraFar);
|
|
38
|
+
#endif
|
|
39
|
+
}
|
|
46
40
|
|
|
47
|
-
|
|
41
|
+
vec3 slerp(const vec3 a, const vec3 b, const float t) {
|
|
42
|
+
float cosAngle = dot(a, b);
|
|
43
|
+
float angle = acos(cosAngle);
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
if (abs(angle) < 0.001) {
|
|
46
|
+
return mix(a, b, t);
|
|
47
|
+
}
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
float sinAngle = sin(angle);
|
|
50
|
+
float t1 = sin((1.0 - t) * angle) / sinAngle;
|
|
51
|
+
float t2 = sin(t * angle) / sinAngle;
|
|
54
52
|
|
|
55
|
-
|
|
53
|
+
return (a * t1) + (b * t2);
|
|
54
|
+
}
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
// source: https://www.shadertoy.com/view/cll3R4
|
|
57
|
+
vec3 cosineSampleHemisphere(const vec3 n, const vec2 u) {
|
|
58
|
+
float r = sqrt(u.x);
|
|
59
|
+
float theta = 2.0 * PI * u.y;
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return occlusion;
|
|
63
|
-
}
|
|
61
|
+
vec3 b = normalize(cross(n, vec3(0.0, 1.0, 1.0)));
|
|
62
|
+
vec3 t = cross(b, n);
|
|
64
63
|
|
|
65
|
-
return 0
|
|
64
|
+
return normalize(r * sin(theta) * b + sqrt(1.0 - u.x) * n + r * cos(theta) * t);
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
void main() {
|
|
69
68
|
float depth = textureLod(depthTexture, vUv, 0.0).r;
|
|
69
|
+
vec3 normal = computeNormal(vUv);
|
|
70
70
|
|
|
71
71
|
// filter out background
|
|
72
72
|
if (depth == 1.0) {
|
|
73
|
-
|
|
73
|
+
gl_FragColor = vec4(normal, 1.0);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
vec4 cameraPosition = cameraMatrixWorld * vec4(0.0, 0.0, 0.0, 1.0);
|
|
78
78
|
|
|
79
|
-
vec3 worldPos =
|
|
80
|
-
vec3
|
|
79
|
+
vec3 worldPos = computeWorldPosition(depth, vUv);
|
|
80
|
+
vec3 screenSpaceNormal = getUnpackedNormal(vUv);
|
|
81
81
|
|
|
82
82
|
float ao = 0.0, totalWeight = 0.0;
|
|
83
83
|
|
|
84
84
|
for (int i = 0; i < spp; i++) {
|
|
85
85
|
int seed = i;
|
|
86
|
-
#ifdef animatedNoise
|
|
87
|
-
|
|
88
|
-
#endif
|
|
86
|
+
#ifdef animatedNoise
|
|
87
|
+
seed += frame;
|
|
88
|
+
#endif
|
|
89
|
+
|
|
90
|
+
vec4 blueNoise = sampleBlueNoise(blueNoiseTexture, seed, blueNoiseRepeat, texSize);
|
|
91
|
+
|
|
92
|
+
vec3 sampleWorldDir = cosineSampleHemisphere(normal, blueNoise.rg);
|
|
93
|
+
|
|
94
|
+
vec3 sampleWorldPos = worldPos + aoDistance * pow(blueNoise.b, distancePower + 1.0) * sampleWorldDir;
|
|
95
|
+
|
|
96
|
+
// Project the sample position to screen space
|
|
97
|
+
vec4 sampleUv = projectionViewMatrix * vec4(sampleWorldPos, 1.);
|
|
98
|
+
sampleUv.xy /= sampleUv.w;
|
|
99
|
+
sampleUv.xy = sampleUv.xy * 0.5 + 0.5;
|
|
100
|
+
|
|
101
|
+
// Get the depth of the sample position
|
|
102
|
+
float sampleDepth = textureLod(depthTexture, sampleUv.xy, 0.0).r;
|
|
103
|
+
|
|
104
|
+
if(sampleDepth < 1.0) {
|
|
105
|
+
vec3 sampleNormal = getUnpackedNormal(sampleUv.xy);
|
|
106
|
+
|
|
107
|
+
// Compute the horizon line
|
|
108
|
+
float deltaDepth = depth - sampleDepth;
|
|
109
|
+
|
|
110
|
+
// distance based bias
|
|
111
|
+
float d = distance(sampleWorldPos, cameraPosition.xyz) / aoDistance;
|
|
112
|
+
deltaDepth *= 0.001 * d * d;
|
|
113
|
+
|
|
114
|
+
float th = thickness * 0.01;
|
|
115
|
+
|
|
116
|
+
float theta = dot(normal, sampleWorldDir);
|
|
117
|
+
totalWeight += theta;
|
|
118
|
+
|
|
119
|
+
if (deltaDepth < th) {
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
float horizon = sampleDepth + deltaDepth * bias * 1000.;
|
|
123
|
+
|
|
124
|
+
float occlusion = max(0.0, horizon - depth) * theta;
|
|
125
|
+
|
|
126
|
+
float m = max(0., 1. - deltaDepth / th);
|
|
127
|
+
occlusion = 10. * occlusion * m / d;
|
|
89
128
|
|
|
90
|
-
|
|
91
|
-
|
|
129
|
+
occlusion = max(0.0, occlusion);
|
|
130
|
+
|
|
131
|
+
// check if the normals are in the same direction
|
|
132
|
+
float dotProduct = dot(screenSpaceNormal, sampleNormal);
|
|
133
|
+
if (dotProduct < 0.9999) {
|
|
134
|
+
|
|
135
|
+
occlusion = sqrt(occlusion);
|
|
136
|
+
ao += occlusion;
|
|
137
|
+
} else {
|
|
138
|
+
if(areDepthsOnSamePlane(depth, sampleDepth, vUv, sampleUv.xy, screenSpaceNormal, 0.1)) {
|
|
139
|
+
// occluded += 0.0;
|
|
140
|
+
// totalWeight += 1.0;
|
|
141
|
+
} else {
|
|
142
|
+
|
|
143
|
+
occlusion = sqrt(occlusion);
|
|
144
|
+
ao += occlusion;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
92
149
|
}
|
|
93
150
|
|
|
94
151
|
if (totalWeight > 0.) ao /= totalWeight;
|
|
@@ -96,7 +153,7 @@ void main() {
|
|
|
96
153
|
// clamp ao to [0, 1]
|
|
97
154
|
ao = clamp(1. - ao, 0., 1.);
|
|
98
155
|
|
|
99
|
-
gl_FragColor = vec4(
|
|
156
|
+
gl_FragColor = vec4(normal, ao);
|
|
100
157
|
}
|
|
101
158
|
`;
|
|
102
159
|
//# sourceMappingURL=hbao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hbao.js","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/hbao/shader/hbao.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG
|
|
1
|
+
{"version":3,"file":"hbao.js","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/hbao/shader/hbao.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0JnB,CAAC"}
|
|
@@ -24,7 +24,7 @@ export declare class PoissionDenoisePass extends Pass {
|
|
|
24
24
|
constructor(camera: Camera, inputTexture: Texture, depthTexture: Texture, options?: {
|
|
25
25
|
[key: string]: unknown;
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
static loadBlueNoiseTexture(): Promise<void>;
|
|
28
28
|
get texture(): Texture;
|
|
29
29
|
generateDenoiseSamples(numSamples: number, numRings: number, r: number, texelSize: Vector2): Vector2[];
|
|
30
30
|
generatePoissonDiskConstant(poissonDisk: Vector2[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoissionDenoisePass.d.ts","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.ts"],"names":[],"mappings":"AACA,OAAO,EACN,MAAM,EAON,OAAO,EAEP,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAkBtC,qBAAa,mBAAoB,SAAQ,IAAI;IAG5C,OAAc,cAAc;;;;;;;;;;MAA6B;IACzD,OAAc,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAElC,KAAK,SAAK;IACV,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,SAAwC;IAClD,MAAM,SAAK;IACX,aAAa,EAAE,iBAAiB,CAAC;IACjC,aAAa,EAAE,iBAAiB,CAAC;IACjC,KAAK,SAAS;IACd,OAAO,SAAM;gBAMR,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAA8B;
|
|
1
|
+
{"version":3,"file":"PoissionDenoisePass.d.ts","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.ts"],"names":[],"mappings":"AACA,OAAO,EACN,MAAM,EAON,OAAO,EAEP,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAkBtC,qBAAa,mBAAoB,SAAQ,IAAI;IAG5C,OAAc,cAAc;;;;;;;;;;MAA6B;IACzD,OAAc,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAElC,KAAK,SAAK;IACV,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,SAAwC;IAClD,MAAM,SAAK;IACX,aAAa,EAAE,iBAAiB,CAAC;IACjC,aAAa,EAAE,iBAAiB,CAAC;IACjC,KAAK,SAAS;IACd,OAAO,SAAM;gBAMR,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAA8B;WAqErH,oBAAoB;IA8BxC,IAAW,OAAO,YAEjB;IAMM,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO;IA4B1F,2BAA2B,CAAC,WAAW,EAAE,OAAO,EAAE;IAqBlD,MAAM,CAAC,QAAQ,EAAE,aAAa;IA4B9B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAsB5C"}
|
|
@@ -38,8 +38,11 @@ class PoissionDenoisePass extends postprocessing_1.Pass {
|
|
|
38
38
|
this.radius = 8;
|
|
39
39
|
this.rings = 5.625;
|
|
40
40
|
this.samples = 16;
|
|
41
|
-
if (PoissionDenoisePass.blueNoiseTexture === undefined)
|
|
42
|
-
|
|
41
|
+
if (PoissionDenoisePass.blueNoiseTexture === undefined) {
|
|
42
|
+
PoissionDenoisePass.loadBlueNoiseTexture().then(() => {
|
|
43
|
+
this.fullscreenMaterial.uniforms.blueNoiseTexture.value = PoissionDenoisePass.blueNoiseTexture;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
43
46
|
options = Object.assign(Object.assign({}, defaultPoissonBlurOptions), options);
|
|
44
47
|
this.inputTexture = inputTexture;
|
|
45
48
|
this.fullscreenMaterial = new three_1.ShaderMaterial({
|
|
@@ -91,7 +94,7 @@ class PoissionDenoisePass extends postprocessing_1.Pass {
|
|
|
91
94
|
});
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
|
-
loadBlueNoiseTexture() {
|
|
97
|
+
static loadBlueNoiseTexture() {
|
|
95
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
99
|
const result = yield viewer_shared_services_1.HttpClient.instance.loadTexture('https://viewer.shapediver.com/v3/graphics/LDR_RGBA_0.png');
|
|
97
100
|
if (result) {
|
|
@@ -105,7 +108,6 @@ class PoissionDenoisePass extends postprocessing_1.Pass {
|
|
|
105
108
|
PoissionDenoisePass.blueNoiseTexture.wrapT = three_1.RepeatWrapping;
|
|
106
109
|
PoissionDenoisePass.blueNoiseTexture.colorSpace = three_1.NoColorSpace;
|
|
107
110
|
PoissionDenoisePass.blueNoiseTexture.needsUpdate = true;
|
|
108
|
-
this.fullscreenMaterial.uniforms.blueNoiseTexture.value = PoissionDenoisePass.blueNoiseTexture;
|
|
109
111
|
});
|
|
110
112
|
}
|
|
111
113
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoissionDenoisePass.js","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA8D;AAC9D,iCAae;AACf,+EAAwE;AACxE,mDAAsC;AACtC,8DAA6E;AAC7E,qEAAkE;AAElE,MAAM,mBAAmB,GAAG,iCAAc,CAAC,OAAO,CAAC,4BAA4B,EAAE,iCAAe,CAAC,CAAC;AAElG,MAAM,yBAAyB,GAAG;IACjC,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,CAAC;IACX,aAAa,EAAE,IAAI;CACnB,CAAC;AAEF,MAAa,mBAAoB,SAAQ,qBAAI;IAe5C,6BAA6B;IAE7B,2BAA2B;IAE3B,YAAY,MAAc,EAAE,YAAqB,EAAE,YAAqB,EAAE,UAAsC,yBAAyB;QACxI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAdpB,UAAK,GAAG,CAAC,CAAC;QAEV,eAAU,GAAG,yBAAyB,CAAC,UAAU,CAAC;QAClD,WAAM,GAAG,CAAC,CAAC;QAGX,UAAK,GAAG,KAAK,CAAC;QACd,YAAO,GAAG,EAAE,CAAC;QASnB,IAAI,mBAAmB,CAAC,gBAAgB,KAAK,SAAS;
|
|
1
|
+
{"version":3,"file":"PoissionDenoisePass.js","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/poissionDenoise/PoissionDenoisePass.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA8D;AAC9D,iCAae;AACf,+EAAwE;AACxE,mDAAsC;AACtC,8DAA6E;AAC7E,qEAAkE;AAElE,MAAM,mBAAmB,GAAG,iCAAc,CAAC,OAAO,CAAC,4BAA4B,EAAE,iCAAe,CAAC,CAAC;AAElG,MAAM,yBAAyB,GAAG;IACjC,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,CAAC;IACX,aAAa,EAAE,IAAI;CACnB,CAAC;AAEF,MAAa,mBAAoB,SAAQ,qBAAI;IAe5C,6BAA6B;IAE7B,2BAA2B;IAE3B,YAAY,MAAc,EAAE,YAAqB,EAAE,YAAqB,EAAE,UAAsC,yBAAyB;QACxI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAdpB,UAAK,GAAG,CAAC,CAAC;QAEV,eAAU,GAAG,yBAAyB,CAAC,UAAU,CAAC;QAClD,WAAM,GAAG,CAAC,CAAC;QAGX,UAAK,GAAG,KAAK,CAAC;QACd,YAAO,GAAG,EAAE,CAAC;QASnB,IAAI,mBAAmB,CAAC,gBAAgB,KAAK,SAAS,EA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M,EACX,IAAI,eAAO,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAClC,CAAC;QAEF,MAAM,YAAY,GAAG,uBAAuB,IAAI,CAAC,OAAO,KAAK,CAAC;QAE9D,MAAM,mBAAmB,GAAG,IAAI,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAC;QAEzE,IAAI,CAAC,kBAAqC,CAAC,cAAc,GAAG,YAAY,GAAG,mBAAmB,GAAG,IAAI,GAAG,mBAAmB,CAAC;QAC5H,IAAI,CAAC,kBAAqC,CAAC,WAAW,GAAG,IAAI,CAAC;IAChE,CAAC;;AA9NF,kDAiOC;AAhOA,0BAA0B;AAEZ,kCAAc,GAAG,yBAAyB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const poissionDenoise = "\nvarying vec2 vUv;\n\nuniform sampler2D inputTexture;\nuniform highp sampler2D depthTexture;\nuniform sampler2D normalTexture;\nuniform mat4 projectionMatrixInverse;\nuniform mat4 cameraMatrixWorld;\nuniform float lumaPhi;\nuniform float depthPhi;\nuniform float normalPhi;\nuniform float distance;\nuniform sampler2D blueNoiseTexture;\nuniform vec2 blueNoiseRepeat;\nuniform int index;\nuniform vec2 resolution;\n\n#include <common>\n#include <sampleBlueNoise>\n\nvec3
|
|
1
|
+
export declare const poissionDenoise = "\nvarying vec2 vUv;\n\nuniform sampler2D inputTexture;\nuniform highp sampler2D depthTexture;\nuniform highp sampler2D normalTexture;\nuniform mat4 projectionMatrixInverse;\nuniform mat4 viewMatrixInverse;\nuniform mat4 cameraMatrixWorld;\nuniform float lumaPhi;\nuniform float depthPhi;\nuniform float normalPhi;\nuniform float distance;\nuniform sampler2D blueNoiseTexture;\nuniform vec2 blueNoiseRepeat;\nuniform int index;\nuniform vec2 resolution;\n\n#include <common>\n#include <sampleBlueNoise>\n\nvec3 computeWorldPosition(float depth, vec2 coord, bool useCameraMatrixWorld) {\n // Convert depth to normalized device coordinates (NDC)\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n\n // Transform to view space\n vec4 viewSpacePosition = projectionMatrixInverse * clipSpacePosition;\n\n // Perspective division\n viewSpacePosition /= viewSpacePosition.w;\n\n // Transform to world space using the selected method\n vec4 worldSpacePosition;\n if (useCameraMatrixWorld) {\n // Use cameraMatrixWorld directly\n worldSpacePosition = cameraMatrixWorld * viewSpacePosition;\n } else {\n // Use viewMatrixInverse\n worldSpacePosition = viewMatrixInverse * viewSpacePosition;\n }\n\n return worldSpacePosition.xyz;\n}\n\n#define luminance(a) dot(vec3(0.2125, 0.7154, 0.0721), a)\n\nvec3 getNormal(vec2 uv, vec4 texel) {\n#ifdef NORMAL_IN_RGB\n // in case the normal is stored in the RGB channels of the texture\n return texel.rgb;\n#else\n return normalize(textureLod(normalTexture, uv, 0.).xyz * 2.0 - 1.0);\n#endif\n}\n\nfloat distToPlane(const vec3 worldPos, const vec3 neighborWorldPos, const vec3 worldNormal) {\n vec3 toCurrent = worldPos - neighborWorldPos;\n float distToPlane = abs(dot(toCurrent, worldNormal));\n\n return distToPlane;\n}\n\nvoid main() {\n vec4 depthTexel = textureLod(depthTexture, vUv, 0.);\n vec4 texel = textureLod(inputTexture, vUv, 0.0);\n vec3 normal = getNormal(vUv, texel);\n\n if (depthTexel.r == 1.0 || dot(depthTexel.rgb, depthTexel.rgb) == 0.) {\n #ifdef NORMAL_IN_RGB\n gl_FragColor = vec4(normal, 1.0);\n #else\n gl_FragColor = vec4(1.0);\n #endif\n\n return;\n }\n\n #ifdef NORMAL_IN_RGB\n float inputTexel = texel.a;\n float center = texel.a;\n #else\n vec3 inputTexel = texel.rgb;\n vec3 center = texel.rgb;\n #endif\n\n float depth = depthTexel.x;\n vec3 worldPos = computeWorldPosition(depth, vUv, true);\n\n float totalWeight = 1.0;\n\n vec4 blueNoise = sampleBlueNoise(blueNoiseTexture, 0, blueNoiseRepeat, resolution);\n float angle = blueNoise[index];\n\n float s = sin(angle), c = cos(angle);\n\n mat2 rotationMatrix = mat2(c, -s, s, c);\n\n \n #ifdef NORMAL_IN_RGB\n float denoised = inputTexel;\n #else\n vec3 denoised = inputTexel;\n #endif\n\n for (int i = 0; i < samples; i++) {\n vec2 offset = rotationMatrix * poissonDisk[i];\n vec2 neighborUv = vUv + offset;\n\n vec4 neighborTexel = textureLod(inputTexture, neighborUv, 0.0);\n\n vec3 neighborNormal = getNormal(neighborUv, neighborTexel);\n #ifdef NORMAL_IN_RGB\n float neighborColor = neighborTexel.a;\n #else\n vec3 neighborColor = neighborTexel.rgb;\n #endif\n\n float sampleDepth = textureLod(depthTexture, neighborUv, 0.0).x;\n\n vec3 worldPosSample = computeWorldPosition(sampleDepth, neighborUv, true);\n float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));\n\n if (sampleDepth < 1.0) {\n float normalDiff = dot(normal, neighborNormal);\n float normalSimilarity = pow(max(normalDiff, 0.), normalPhi);\n\n #ifdef NORMAL_IN_RGB\n float lumaDiff = abs(neighborColor - center);\n #else\n float lumaDiff = abs(luminance(neighborColor) - luminance(center));\n #endif\n float lumaSimilarity = max(1.0 - lumaDiff / lumaPhi, 0.0);\n\n float depthDiff = 1. - (distToPlane(worldPos, worldPosSample, normal) / distance);\n float depthSimilarity = max(depthDiff / depthPhi, 0.);\n\n float w = lumaSimilarity * depthSimilarity * normalSimilarity;\n\n denoised += w * neighborColor;\n totalWeight += w;\n }\n }\n\n if (totalWeight > 0.) denoised /= totalWeight;\n\n #ifdef NORMAL_IN_RGB\n gl_FragColor = vec4(normal, denoised);\n #else\n gl_FragColor = vec4(denoised, 1.);\n #endif\n}\n";
|
|
2
2
|
//# sourceMappingURL=poissionDenoise.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poissionDenoise.d.ts","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"poissionDenoise.d.ts","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,ykJAwJ3B,CAAC"}
|
|
@@ -6,8 +6,9 @@ varying vec2 vUv;
|
|
|
6
6
|
|
|
7
7
|
uniform sampler2D inputTexture;
|
|
8
8
|
uniform highp sampler2D depthTexture;
|
|
9
|
-
uniform sampler2D normalTexture;
|
|
9
|
+
uniform highp sampler2D normalTexture;
|
|
10
10
|
uniform mat4 projectionMatrixInverse;
|
|
11
|
+
uniform mat4 viewMatrixInverse;
|
|
11
12
|
uniform mat4 cameraMatrixWorld;
|
|
12
13
|
uniform float lumaPhi;
|
|
13
14
|
uniform float depthPhi;
|
|
@@ -21,14 +22,27 @@ uniform vec2 resolution;
|
|
|
21
22
|
#include <common>
|
|
22
23
|
#include <sampleBlueNoise>
|
|
23
24
|
|
|
24
|
-
vec3
|
|
25
|
+
vec3 computeWorldPosition(float depth, vec2 coord, bool useCameraMatrixWorld) {
|
|
26
|
+
// Convert depth to normalized device coordinates (NDC)
|
|
25
27
|
float z = depth * 2.0 - 1.0;
|
|
26
28
|
vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);
|
|
29
|
+
|
|
30
|
+
// Transform to view space
|
|
27
31
|
vec4 viewSpacePosition = projectionMatrixInverse * clipSpacePosition;
|
|
28
32
|
|
|
29
33
|
// Perspective division
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
viewSpacePosition /= viewSpacePosition.w;
|
|
35
|
+
|
|
36
|
+
// Transform to world space using the selected method
|
|
37
|
+
vec4 worldSpacePosition;
|
|
38
|
+
if (useCameraMatrixWorld) {
|
|
39
|
+
// Use cameraMatrixWorld directly
|
|
40
|
+
worldSpacePosition = cameraMatrixWorld * viewSpacePosition;
|
|
41
|
+
} else {
|
|
42
|
+
// Use viewMatrixInverse
|
|
43
|
+
worldSpacePosition = viewMatrixInverse * viewSpacePosition;
|
|
44
|
+
}
|
|
45
|
+
|
|
32
46
|
return worldSpacePosition.xyz;
|
|
33
47
|
}
|
|
34
48
|
|
|
@@ -52,26 +66,29 @@ float distToPlane(const vec3 worldPos, const vec3 neighborWorldPos, const vec3 w
|
|
|
52
66
|
|
|
53
67
|
void main() {
|
|
54
68
|
vec4 depthTexel = textureLod(depthTexture, vUv, 0.);
|
|
69
|
+
vec4 texel = textureLod(inputTexture, vUv, 0.0);
|
|
70
|
+
vec3 normal = getNormal(vUv, texel);
|
|
55
71
|
|
|
56
72
|
if (depthTexel.r == 1.0 || dot(depthTexel.rgb, depthTexel.rgb) == 0.) {
|
|
57
|
-
|
|
73
|
+
#ifdef NORMAL_IN_RGB
|
|
74
|
+
gl_FragColor = vec4(normal, 1.0);
|
|
75
|
+
#else
|
|
76
|
+
gl_FragColor = vec4(1.0);
|
|
77
|
+
#endif
|
|
78
|
+
|
|
58
79
|
return;
|
|
59
80
|
}
|
|
60
81
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
#else
|
|
69
|
-
vec3 denoised = texel.rgb;
|
|
70
|
-
vec3 center = texel.rgb;
|
|
71
|
-
#endif
|
|
82
|
+
#ifdef NORMAL_IN_RGB
|
|
83
|
+
float inputTexel = texel.a;
|
|
84
|
+
float center = texel.a;
|
|
85
|
+
#else
|
|
86
|
+
vec3 inputTexel = texel.rgb;
|
|
87
|
+
vec3 center = texel.rgb;
|
|
88
|
+
#endif
|
|
72
89
|
|
|
73
90
|
float depth = depthTexel.x;
|
|
74
|
-
vec3 worldPos =
|
|
91
|
+
vec3 worldPos = computeWorldPosition(depth, vUv, true);
|
|
75
92
|
|
|
76
93
|
float totalWeight = 1.0;
|
|
77
94
|
|
|
@@ -82,6 +99,13 @@ void main() {
|
|
|
82
99
|
|
|
83
100
|
mat2 rotationMatrix = mat2(c, -s, s, c);
|
|
84
101
|
|
|
102
|
+
|
|
103
|
+
#ifdef NORMAL_IN_RGB
|
|
104
|
+
float denoised = inputTexel;
|
|
105
|
+
#else
|
|
106
|
+
vec3 denoised = inputTexel;
|
|
107
|
+
#endif
|
|
108
|
+
|
|
85
109
|
for (int i = 0; i < samples; i++) {
|
|
86
110
|
vec2 offset = rotationMatrix * poissonDisk[i];
|
|
87
111
|
vec2 neighborUv = vUv + offset;
|
|
@@ -89,43 +113,45 @@ void main() {
|
|
|
89
113
|
vec4 neighborTexel = textureLod(inputTexture, neighborUv, 0.0);
|
|
90
114
|
|
|
91
115
|
vec3 neighborNormal = getNormal(neighborUv, neighborTexel);
|
|
92
|
-
#ifdef NORMAL_IN_RGB
|
|
93
|
-
|
|
94
|
-
#else
|
|
95
|
-
|
|
96
|
-
#endif
|
|
116
|
+
#ifdef NORMAL_IN_RGB
|
|
117
|
+
float neighborColor = neighborTexel.a;
|
|
118
|
+
#else
|
|
119
|
+
vec3 neighborColor = neighborTexel.rgb;
|
|
120
|
+
#endif
|
|
97
121
|
|
|
98
122
|
float sampleDepth = textureLod(depthTexture, neighborUv, 0.0).x;
|
|
99
123
|
|
|
100
|
-
vec3 worldPosSample =
|
|
124
|
+
vec3 worldPosSample = computeWorldPosition(sampleDepth, neighborUv, true);
|
|
101
125
|
float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));
|
|
102
126
|
|
|
103
|
-
|
|
104
|
-
|
|
127
|
+
if (sampleDepth < 1.0) {
|
|
128
|
+
float normalDiff = dot(normal, neighborNormal);
|
|
129
|
+
float normalSimilarity = pow(max(normalDiff, 0.), normalPhi);
|
|
105
130
|
|
|
106
|
-
#ifdef NORMAL_IN_RGB
|
|
107
|
-
|
|
108
|
-
#else
|
|
109
|
-
|
|
110
|
-
#endif
|
|
111
|
-
|
|
131
|
+
#ifdef NORMAL_IN_RGB
|
|
132
|
+
float lumaDiff = abs(neighborColor - center);
|
|
133
|
+
#else
|
|
134
|
+
float lumaDiff = abs(luminance(neighborColor) - luminance(center));
|
|
135
|
+
#endif
|
|
136
|
+
float lumaSimilarity = max(1.0 - lumaDiff / lumaPhi, 0.0);
|
|
112
137
|
|
|
113
|
-
|
|
114
|
-
|
|
138
|
+
float depthDiff = 1. - (distToPlane(worldPos, worldPosSample, normal) / distance);
|
|
139
|
+
float depthSimilarity = max(depthDiff / depthPhi, 0.);
|
|
115
140
|
|
|
116
|
-
|
|
141
|
+
float w = lumaSimilarity * depthSimilarity * normalSimilarity;
|
|
117
142
|
|
|
118
|
-
|
|
119
|
-
|
|
143
|
+
denoised += w * neighborColor;
|
|
144
|
+
totalWeight += w;
|
|
145
|
+
}
|
|
120
146
|
}
|
|
121
147
|
|
|
122
148
|
if (totalWeight > 0.) denoised /= totalWeight;
|
|
123
149
|
|
|
124
|
-
#ifdef NORMAL_IN_RGB
|
|
125
|
-
|
|
126
|
-
#else
|
|
127
|
-
|
|
128
|
-
#endif
|
|
150
|
+
#ifdef NORMAL_IN_RGB
|
|
151
|
+
gl_FragColor = vec4(normal, denoised);
|
|
152
|
+
#else
|
|
153
|
+
gl_FragColor = vec4(denoised, 1.);
|
|
154
|
+
#endif
|
|
129
155
|
}
|
|
130
156
|
`;
|
|
131
157
|
//# sourceMappingURL=poissionDenoise.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poissionDenoise.js","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG
|
|
1
|
+
{"version":3,"file":"poissionDenoise.js","sourceRoot":"","sources":["../../../../../../src/managers/postprocessing/ao/poissionDenoise/shader/poissionDenoise.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJ9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSAOEffect.d.ts","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/ssao/SSAOEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SSAOEffect.d.ts","sourceRoot":"","sources":["../../../../../src/managers/postprocessing/ao/ssao/SSAOEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiB1C,cAAM,UAAW,SAAQ,QAAQ;IAGzB,GAAG,SAAM;gBAMJ,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;IAuBjG,iBAAiB,CAAC,CAAC,EAAE,MAAM;IAe3B,mBAAmB,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;CAwC9D;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|