@threedog/post-effects 0.8.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +2 -2
- package/tsl.js +0 -1
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Optional post effects for [threedog](https://www.npmjs.com/package/threedog): `bloom`, `ao` (ambient occlusion), `outline`, `dof` (depth of field) on the HDR side, and `lut` (color grade; `paletteLut` makes its LUT from a fixed palette), `grain`, `vignette`, `chromatic` (chromatic aberration) fused into one fullscreen LDR pass. Import only what you use; the engine itself ships no effects.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install @threedog/post-effects@
|
|
6
|
+
npm install @threedog/post-effects@1
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
This describes
|
|
9
|
+
This describes 1.0: `npm install @threedog/post-effects@1` (games made in the [repository](https://github.com/penstic123-code/Threedog.js-Game-Engine) already have it).
|
|
10
10
|
|
|
11
11
|
Each effect is one value that runs on WebGL and on WebGPU. It goes in the way every post effect does, `engine.post.add`:
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threedog/post-effects",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Optional post effects for threedog: bloom, ambient occlusion, outline, LUT color grading, film grain, vignette, chromatic aberration and depth of field (light ldr effects are fused into one fullscreen pass)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"*.d.ts"
|
|
32
32
|
],
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"threedog": "^0.
|
|
34
|
+
"threedog": "^1.0.1",
|
|
35
35
|
"three": "^0.187.0"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/tsl.js
CHANGED
|
@@ -38,7 +38,6 @@ export function voxelGI({ resolution = 128, bounds, intensity = 1, occlusion = 0
|
|
|
38
38
|
const { tsl, p, scenePass, scene, camera, display } = ctx;
|
|
39
39
|
gi = display.own(vxgi(scenePass.getTextureNode('depth'), scenePass.getTextureNode('normal'), scene, camera, resolution));
|
|
40
40
|
display.own({ dispose() { gi = null; } });
|
|
41
|
-
gi.volume.layers.enable(RESERVED_LAYERS.occlusionHidden); // a wall out of the camera's sight still throws its color
|
|
42
41
|
if (bounds) gi.volume.bounds.copy(bounds);
|
|
43
42
|
setup?.(gi);
|
|
44
43
|
const light = gi.getGINode().rgb.mul(scenePass.getTextureNode('diffuse').rgb).mul(p.intensity);
|