@driftengine/core 4.8.7 → 4.9.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/CHANGELOG.json +61 -0
- package/README.md +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/render/atmosphere.d.ts +13 -0
- package/dist/render/atmosphere.js +9 -1
- package/dist/render/backend/api.d.ts +9 -1
- package/dist/render/backend/createRenderer.d.ts +6 -0
- package/dist/render/backend/createRenderer.js +4 -1
- package/dist/render/backend/webgl2/renderer.d.ts +90 -2
- package/dist/render/backend/webgl2/renderer.js +297 -16
- package/dist/render/backend/webgpu/device.d.ts +7 -1
- package/dist/render/backend/webgpu/device.js +31 -3
- package/dist/render/backend/webgpu/flatPass.d.ts +16 -1
- package/dist/render/backend/webgpu/flatPass.js +58 -26
- package/dist/render/backend/webgpu/postPass.d.ts +51 -9
- package/dist/render/backend/webgpu/postPass.js +16 -2
- package/dist/render/backend/webgpu/reflectionSurfacePass.d.ts +30 -0
- package/dist/render/backend/webgpu/reflectionSurfacePass.js +100 -0
- package/dist/render/backend/webgpu/renderer.d.ts +131 -2
- package/dist/render/backend/webgpu/renderer.js +586 -70
- package/dist/render/displayRange.d.ts +31 -0
- package/dist/render/displayRange.js +47 -0
- package/dist/render/filmicCurve.d.ts +74 -0
- package/dist/render/filmicCurve.js +203 -0
- package/dist/render/fog.d.ts +4 -1
- package/dist/render/fog.js +12 -2
- package/dist/render/frame/resources.d.ts +2 -2
- package/dist/render/frame/resources.js +6 -0
- package/dist/render/frameReflections.d.ts +40 -0
- package/dist/render/frameReflections.js +48 -0
- package/dist/render/pass.d.ts +49 -0
- package/dist/render/reflectionSurfaceTargets.d.ts +28 -0
- package/dist/render/reflectionSurfaceTargets.js +99 -0
- package/dist/render/renderQuality.d.ts +39 -8
- package/dist/render/renderQuality.js +4 -0
- package/dist/render/sceneTarget.d.ts +5 -0
- package/dist/render/sceneTarget.js +24 -1
- package/dist/render/screenSpaceReflection.d.ts +5 -0
- package/dist/render/screenSpaceReflection.js +5 -0
- package/dist/render/shaders/arcane.d.ts +1 -1
- package/dist/render/shaders/bolt.d.ts +1 -1
- package/dist/render/shaders/caustics.d.ts +1 -1
- package/dist/render/shaders/film.d.ts +1 -1
- package/dist/render/shaders/filmLook.js +2 -1
- package/dist/render/shaders/fire.d.ts +1 -1
- package/dist/render/shaders/flat/glassTint.d.ts +1 -1
- package/dist/render/shaders/flat/glassTint.js +2 -0
- package/dist/render/shaders/flat/index.d.ts +10 -0
- package/dist/render/shaders/flat/index.js +6 -0
- package/dist/render/shaders/flat/main.d.ts +1 -1
- package/dist/render/shaders/flat/main.js +28 -0
- package/dist/render/shaders/flat/overlay.d.ts +16 -0
- package/dist/render/shaders/flat/overlay.js +117 -0
- package/dist/render/shaders/flat/pointShadow.js +1 -1
- package/dist/render/shaders/flat/reflectionSurface.d.ts +21 -0
- package/dist/render/shaders/flat/reflectionSurface.js +61 -0
- package/dist/render/shaders/fog.d.ts +1 -1
- package/dist/render/shaders/fog.js +9 -2
- package/dist/render/shaders/fringe.d.ts +29 -0
- package/dist/render/shaders/fringe.js +55 -0
- package/dist/render/shaders/generated/arcane.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/arcane.wgsl.js +1 -1
- package/dist/render/shaders/generated/bolt.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/bolt.wgsl.js +1 -1
- package/dist/render/shaders/generated/caustics.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/caustics.wgsl.js +1 -1
- package/dist/render/shaders/generated/film.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/film.wgsl.js +1 -1
- package/dist/render/shaders/generated/fire.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/fire.wgsl.js +1 -1
- package/dist/render/shaders/generated/flat.wgsl.d.ts +176 -16
- package/dist/render/shaders/generated/flat.wgsl.js +214 -54
- package/dist/render/shaders/generated/line.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/line.wgsl.js +1 -1
- package/dist/render/shaders/generated/particle.wgsl.d.ts +4 -4
- package/dist/render/shaders/generated/particle.wgsl.js +4 -4
- package/dist/render/shaders/generated/rush.wgsl.d.ts +56 -26
- package/dist/render/shaders/generated/rush.wgsl.js +56 -26
- package/dist/render/shaders/generated/scatter.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/scatter.wgsl.js +1 -1
- package/dist/render/shaders/generated/smoke.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/smoke.wgsl.js +1 -1
- package/dist/render/shaders/generated/ssrResolve.wgsl.d.ts +29 -0
- package/dist/render/shaders/generated/ssrResolve.wgsl.js +29 -0
- package/dist/render/shaders/generated/ssrTrace.wgsl.d.ts +22 -2
- package/dist/render/shaders/generated/ssrTrace.wgsl.js +22 -2
- package/dist/render/shaders/generated/water.wgsl.d.ts +1 -1
- package/dist/render/shaders/generated/water.wgsl.js +1 -1
- package/dist/render/shaders/gpudriven/fog.wgsl.d.ts +2 -2
- package/dist/render/shaders/gpudriven/fog.wgsl.js +11 -3
- package/dist/render/shaders/line.d.ts +1 -1
- package/dist/render/shaders/particle.d.ts +3 -3
- package/dist/render/shaders/rush.js +54 -11
- package/dist/render/shaders/scatter.d.ts +1 -1
- package/dist/render/shaders/smoke.d.ts +1 -1
- package/dist/render/shaders/ssrResolve.d.ts +17 -0
- package/dist/render/shaders/ssrResolve.js +51 -0
- package/dist/render/shaders/ssrTrace.js +26 -0
- package/dist/render/shaders/water.d.ts +1 -1
- package/dist/render/ssrPass.d.ts +16 -0
- package/dist/render/ssrPass.js +106 -1
- package/dist/render/surfaceOverlay.d.ts +132 -0
- package/dist/render/surfaceOverlay.js +85 -0
- package/dist/render/surfaceTexture.d.ts +19 -0
- package/dist/render/surfaceTexture.js +69 -0
- package/dist/render/temporalAa.d.ts +14 -0
- package/dist/render/temporalAa.js +20 -0
- package/dist/render/vertexDefaults.d.ts +17 -0
- package/dist/render/vertexDefaults.js +24 -0
- package/package.json +6 -6
- package/src/index.ts +16 -0
- package/src/render/atmosphere.ts +22 -1
- package/src/render/backend/api.ts +9 -0
- package/src/render/backend/createRenderer.ts +18 -1
- package/src/render/backend/webgl2/renderer.ts +357 -13
- package/src/render/backend/webgpu/device.ts +42 -3
- package/src/render/backend/webgpu/flatPass.ts +63 -26
- package/src/render/backend/webgpu/postPass.ts +18 -0
- package/src/render/backend/webgpu/reflectionSurfacePass.ts +114 -0
- package/src/render/backend/webgpu/renderer.ts +735 -83
- package/src/render/displayRange.ts +61 -0
- package/src/render/filmicCurve.ts +229 -0
- package/src/render/fog.ts +19 -3
- package/src/render/frame/resources.ts +6 -0
- package/src/render/frameReflections.ts +72 -0
- package/src/render/pass.ts +53 -1
- package/src/render/reflectionSurfaceTargets.ts +105 -0
- package/src/render/renderQuality.ts +44 -8
- package/src/render/sceneTarget.ts +30 -2
- package/src/render/screenSpaceReflection.ts +5 -0
- package/src/render/shaders/filmLook.ts +2 -1
- package/src/render/shaders/flat/glassTint.ts +5 -1
- package/src/render/shaders/flat/index.ts +16 -0
- package/src/render/shaders/flat/main.ts +28 -0
- package/src/render/shaders/flat/overlay.ts +117 -0
- package/src/render/shaders/flat/pointShadow.ts +1 -1
- package/src/render/shaders/flat/reflectionSurface.ts +61 -0
- package/src/render/shaders/fog.ts +9 -2
- package/src/render/shaders/fringe.ts +59 -0
- package/src/render/shaders/generated/arcane.wgsl.ts +1 -1
- package/src/render/shaders/generated/bolt.wgsl.ts +1 -1
- package/src/render/shaders/generated/caustics.wgsl.ts +1 -1
- package/src/render/shaders/generated/film.wgsl.ts +1 -1
- package/src/render/shaders/generated/fire.wgsl.ts +1 -1
- package/src/render/shaders/generated/flat.wgsl.ts +214 -54
- package/src/render/shaders/generated/line.wgsl.ts +1 -1
- package/src/render/shaders/generated/particle.wgsl.ts +4 -4
- package/src/render/shaders/generated/rush.wgsl.ts +56 -26
- package/src/render/shaders/generated/scatter.wgsl.ts +1 -1
- package/src/render/shaders/generated/smoke.wgsl.ts +1 -1
- package/src/render/shaders/generated/ssrResolve.wgsl.ts +30 -0
- package/src/render/shaders/generated/ssrTrace.wgsl.ts +22 -2
- package/src/render/shaders/generated/water.wgsl.ts +1 -1
- package/src/render/shaders/gpudriven/fog.wgsl.ts +11 -3
- package/src/render/shaders/rush.ts +54 -11
- package/src/render/shaders/ssrResolve.ts +52 -0
- package/src/render/shaders/ssrTrace.ts +26 -0
- package/src/render/ssrPass.ts +138 -1
- package/src/render/surfaceOverlay.ts +195 -0
- package/src/render/surfaceTexture.ts +67 -0
- package/src/render/temporalAa.ts +20 -0
- package/src/render/vertexDefaults.ts +28 -0
|
@@ -23,6 +23,7 @@ import type { TextStyle } from '../../textLayout.ts';
|
|
|
23
23
|
import { GpuSurfaceTexture } from './surfaceTexturePass.ts';
|
|
24
24
|
import { GpuClothBinding, GpuClothParticles } from './clothTextures.ts';
|
|
25
25
|
import type { ComputeHost } from './computeHost.ts';
|
|
26
|
+
import { type SurfaceOverlay } from '../../surfaceOverlay.ts';
|
|
26
27
|
import type { ClothBindingData } from '../../clothBindingData.ts';
|
|
27
28
|
import type { CompressedTextureFormat, SurfaceSource } from '../../compressedSource.ts';
|
|
28
29
|
import { GpuSdfText } from './sdfTextPass.ts';
|
|
@@ -30,6 +31,8 @@ import type { SdfFont } from '../../sdfFont.ts';
|
|
|
30
31
|
import type { SdfTextStyle } from '../../sdfTextLayout.ts';
|
|
31
32
|
import type { SurfaceMaterial, SurfaceTextureOptions } from '../../surfaceTexture.ts';
|
|
32
33
|
import type { RenderBackend } from '../api.ts';
|
|
34
|
+
import { type DisplayRange } from '../../displayRange.ts';
|
|
35
|
+
import { type FilmicCurve } from '../../filmicCurve.ts';
|
|
33
36
|
import { type ColourGradeLut } from '../../colourGrade.ts';
|
|
34
37
|
import type { CausticSheet } from '../../causticsRenderer.ts';
|
|
35
38
|
import { type GpuCaustics } from './causticsPass.ts';
|
|
@@ -508,6 +511,17 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
508
511
|
*/
|
|
509
512
|
private refractSnapshot;
|
|
510
513
|
private refractSnapshotView;
|
|
514
|
+
/**
|
|
515
|
+
* The frame's colour as a registered pass reads it (`reads: ['colorSnapshot']`): the scene's own
|
|
516
|
+
* size and format, refilled at each such pass's draw. Allocated only once a pass declares the
|
|
517
|
+
* read, beside the frame's targets, and never in the frame loop. See `takePassColour`.
|
|
518
|
+
*/
|
|
519
|
+
private passColour;
|
|
520
|
+
private passColourView;
|
|
521
|
+
/** Registered passes that read the colour, queued this frame for after the upscale. */
|
|
522
|
+
private readonly latePasses;
|
|
523
|
+
/** A late pass draws unjittered, as every late draw does. */
|
|
524
|
+
private readonly latePassJitter;
|
|
511
525
|
/** Whether this frame has taken it. One snapshot serves every refracting draw. */
|
|
512
526
|
private refractSnapshotTaken;
|
|
513
527
|
/**
|
|
@@ -992,6 +1006,15 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
992
1006
|
private readonly reflectionQueue;
|
|
993
1007
|
private ssrLayout;
|
|
994
1008
|
private ssrResolveLayout;
|
|
1009
|
+
/** The frame's materials' reflections, resolved; null where off. See `frameReflections.ts`. */
|
|
1010
|
+
private readonly frameReflections;
|
|
1011
|
+
/** Their surface half, null where they are off or cannot be drawn: `reflectionSurfacePass.ts`. */
|
|
1012
|
+
private readonly reflectionSurface;
|
|
1013
|
+
/** The material resolve: its layout, its one block (the blur) and its group over the three maps. */
|
|
1014
|
+
private ssrMaterialLayout;
|
|
1015
|
+
private ssrMaterialUniforms;
|
|
1016
|
+
private readonly ssrMaterialFloats;
|
|
1017
|
+
private ssrMaterialGroup;
|
|
995
1018
|
private ssrUniforms;
|
|
996
1019
|
private readonly ssrStaging;
|
|
997
1020
|
private readonly ssrFloats;
|
|
@@ -1319,6 +1342,12 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
1319
1342
|
* frame's. See `Renderer.setAmbientSH`: material state, so the next draw takes a slot of its own.
|
|
1320
1343
|
*/
|
|
1321
1344
|
setAmbientSH(coefficients: ArrayLike<number> | null): void;
|
|
1345
|
+
/**
|
|
1346
|
+
* The overlay the following draws wear, or null for none: pass state, put back to none by
|
|
1347
|
+
* `bindMeshPass`. See `renderer.ts` and `surfaceOverlay.ts`. The numbers go in the material block,
|
|
1348
|
+
* which every variant declares; the atlas goes in a twin of each flat group (`overlayGroup`).
|
|
1349
|
+
*/
|
|
1350
|
+
setSurfaceOverlay(overlay: SurfaceOverlay | null): void;
|
|
1322
1351
|
/** How reflective the surfaces drawn next are. Clamped, as `renderer.ts` clamps it. */
|
|
1323
1352
|
setSurfaceReflectivity(amount: number): void;
|
|
1324
1353
|
/** How bright the environment the surfaces drawn next reflect is. See `renderer.ts`. */
|
|
@@ -2555,6 +2584,20 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
2555
2584
|
private warnedNoPointShadowArray;
|
|
2556
2585
|
/** Said once, for the retired ambient dial. */
|
|
2557
2586
|
private warnedEnvironmentAmbient;
|
|
2587
|
+
/** The overlay the draws wear, `uOverlay`: see `setSurfaceOverlay`. */
|
|
2588
|
+
private readonly overlayFloats;
|
|
2589
|
+
/** Its atlas, bound where the refraction copy goes in a twin of each flat group. */
|
|
2590
|
+
private overlayMaps;
|
|
2591
|
+
/**
|
|
2592
|
+
* Each flat group's twin with the atlas in the refraction slot, by the group and the atlas, built
|
|
2593
|
+
* on the first draw that wears it and dropped wherever `flatBindGroups` is.
|
|
2594
|
+
*/
|
|
2595
|
+
private readonly overlayGroups;
|
|
2596
|
+
/** True while a twin is built: what `flatTextures` hands the refraction slot then. */
|
|
2597
|
+
private overlayBinding;
|
|
2598
|
+
/** True between `bindSeeThrough` and `releaseSeeThrough`: that draw reads the copy, not the atlas. */
|
|
2599
|
+
private seeThroughBound;
|
|
2600
|
+
private warnedOverlayRefraction;
|
|
2558
2601
|
private readonly castingWorldIndices;
|
|
2559
2602
|
private readonly resolvedPointShadows;
|
|
2560
2603
|
/** One face's view-projection, rebuilt per face rather than allocated. */
|
|
@@ -2618,6 +2661,15 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
2618
2661
|
*/
|
|
2619
2662
|
private resolveFace;
|
|
2620
2663
|
private buildFlatBindGroup;
|
|
2664
|
+
/**
|
|
2665
|
+
* The open material's flat group, or its twin with the surface overlay's atlas in the refraction
|
|
2666
|
+
* slot where the draw wears one and does not refract. A twin is built from the live material,
|
|
2667
|
+
* which `bindGroup` always is, and kept by the group and the atlas.
|
|
2668
|
+
*
|
|
2669
|
+
* **A draw that refracts, or is glass, keeps the frame's copy** and its overlay reads no image —
|
|
2670
|
+
* the shader asks the same of `uSeeThrough` (`overlayImagesBound`) — said once.
|
|
2671
|
+
*/
|
|
2672
|
+
private overlayGroup;
|
|
2621
2673
|
/**
|
|
2622
2674
|
* The bind group a draw uses, skinned or not.
|
|
2623
2675
|
*
|
|
@@ -2806,6 +2858,13 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
2806
2858
|
* the grade, so they are graded exactly as they were when they were drawn into the scene.
|
|
2807
2859
|
*/
|
|
2808
2860
|
private runLate;
|
|
2861
|
+
/**
|
|
2862
|
+
* The registered passes `drawPass` queued for after the upscale: each handed a fresh copy of the
|
|
2863
|
+
* reconstructed picture with every late draw in it, in the output-size texture the late
|
|
2864
|
+
* refraction keeps (its own reads are done by now: they were recorded before this copy), then
|
|
2865
|
+
* drawn over the picture in a pass of its own.
|
|
2866
|
+
*/
|
|
2867
|
+
private runLatePasses;
|
|
2809
2868
|
/** Whether this draw lands in the reconstructed picture. See `lateRouting.ts`. */
|
|
2810
2869
|
private tracksMotionNow;
|
|
2811
2870
|
/**
|
|
@@ -3010,6 +3069,16 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
3010
3069
|
* the frame, or an order-independent set, none of which the spread reads.
|
|
3011
3070
|
*/
|
|
3012
3071
|
private skinSplits;
|
|
3072
|
+
/** Whether a draw now is the frame's own, and so has a surface half to keep. */
|
|
3073
|
+
private reflectionSurfaceKeeps;
|
|
3074
|
+
/**
|
|
3075
|
+
* An opaque lit draw's surface half, kept for the frame's materials' reflections: the draw again,
|
|
3076
|
+
* with the same slots, buffers and bind group, through the pipeline with `REFLECTION_SURFACE` on —
|
|
3077
|
+
* which writes what the pixel reflects of its environment into the two targets
|
|
3078
|
+
* `reflectionSurfacePass.ts` holds and tests for the depth its frame draw wrote. Replayed when the
|
|
3079
|
+
* frame's pass has ended, before the trace reads them. See `shaders/flat/reflectionSurface.ts`.
|
|
3080
|
+
*/
|
|
3081
|
+
private keepReflectionSurface;
|
|
3013
3082
|
/**
|
|
3014
3083
|
* A skin draw's diffuse and colour halves, kept for the spread: the frame's draw again, twice,
|
|
3015
3084
|
* with the same slots, buffers and bind group, through the pipelines that write the diffuse's
|
|
@@ -3027,6 +3096,21 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
3027
3096
|
*/
|
|
3028
3097
|
private runSkinScatter;
|
|
3029
3098
|
private takeVolumeDepth;
|
|
3099
|
+
/** The colour copy a registered pass reads, at the scene's size and format. See `passColour`. */
|
|
3100
|
+
private allocatePassColour;
|
|
3101
|
+
/**
|
|
3102
|
+
* The frame's colour so far, into `passColour`, for a registered pass that reads it: the
|
|
3103
|
+
* boundary `takeRefractSnapshot` describes — flush, end the pass, copy what its end resolved,
|
|
3104
|
+
* reopen with `load` — and refused where that one is, in a mirror, a probe bake or a capture,
|
|
3105
|
+
* whose pictures are not the frame's. **Not latched**, unlike refraction's: each reading pass
|
|
3106
|
+
* sees the passes drawn before it, at a full-frame copy each.
|
|
3107
|
+
*/
|
|
3108
|
+
private takePassColour;
|
|
3109
|
+
/**
|
|
3110
|
+
* The frame's pass again after a copy between passes, loading everything already drawn: the same
|
|
3111
|
+
* attachments the copy's caller ended, with nothing cleared.
|
|
3112
|
+
*/
|
|
3113
|
+
private reopenFramePass;
|
|
3030
3114
|
/**
|
|
3031
3115
|
* The pass to record into, reopening one on the canvas if the frame has already gone.
|
|
3032
3116
|
*
|
|
@@ -3584,6 +3668,30 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
3584
3668
|
setOutputExposure(exposure: number): void;
|
|
3585
3669
|
/** This frame's exposure into the tone curve. Starts at the profile's own. */
|
|
3586
3670
|
private exposure;
|
|
3671
|
+
/**
|
|
3672
|
+
* The `filmic` curve every later frame is graded through, until it is set again. See
|
|
3673
|
+
* `RendererApi.setFilmicCurve`; the constants are solved here once, not per frame or per pixel.
|
|
3674
|
+
*/
|
|
3675
|
+
setFilmicCurve(curve: FilmicCurve): void;
|
|
3676
|
+
private warnedFilmClamped;
|
|
3677
|
+
/** The curve last set, so a new headroom can solve it again. */
|
|
3678
|
+
private filmCurve;
|
|
3679
|
+
/** The display's peak over paper white; 1 on a standard range. See `setDisplayLuminance`. */
|
|
3680
|
+
private headroom;
|
|
3681
|
+
/** The range the frame goes out in. See `RendererApi.displayRange`. */
|
|
3682
|
+
get displayRange(): DisplayRange;
|
|
3683
|
+
/** Why it is that range, in words. */
|
|
3684
|
+
get displayRangeReason(): string;
|
|
3685
|
+
/**
|
|
3686
|
+
* How bright paper white and the display's peak are, in any one unit (nits, usually), held until
|
|
3687
|
+
* changed: their ratio is how far above white the highlights may run on a high range display,
|
|
3688
|
+
* and nothing changes on a standard one. See `RendererApi.setDisplayLuminance`.
|
|
3689
|
+
*/
|
|
3690
|
+
setDisplayLuminance(paperWhite: number, peak: number): void;
|
|
3691
|
+
/** The curve's eight constants, and the two views the composite uploads them through. */
|
|
3692
|
+
private readonly filmConstants;
|
|
3693
|
+
private readonly filmA;
|
|
3694
|
+
private readonly filmB;
|
|
3587
3695
|
private bloomScale;
|
|
3588
3696
|
/** The draw's own ambient, as `packAmbientSH` writes it; zeros are the frame's. */
|
|
3589
3697
|
private readonly ambientSH;
|
|
@@ -3607,6 +3715,8 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
3607
3715
|
private readonly veilColor;
|
|
3608
3716
|
private veilAlpha;
|
|
3609
3717
|
private vignette;
|
|
3718
|
+
/** The lens's colour fringe: red's and green's pull and where it begins. See `fringe.ts`. */
|
|
3719
|
+
private readonly fringe;
|
|
3610
3720
|
private grain;
|
|
3611
3721
|
private grainSeed;
|
|
3612
3722
|
private warnedLookWithoutComposite;
|
|
@@ -3622,6 +3732,14 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
3622
3732
|
* see `filmLook.ts`. Needs `screenEffects`, and says so once rather than doing nothing.
|
|
3623
3733
|
*/
|
|
3624
3734
|
setVignette(strength: number): void;
|
|
3735
|
+
/**
|
|
3736
|
+
* The lens's colour fringe, held until changed: `intensity` is a percentage, 0 is none, and red
|
|
3737
|
+
* and green are pulled toward the centre by their wavelength's distance from blue, growing from
|
|
3738
|
+
* `start` — a share of the half-frame, 0 the centre — to the whole of it at the edge. Applied to
|
|
3739
|
+
* scene light at the composite's first read. Needs `screenEffects`, and says so once rather than
|
|
3740
|
+
* doing nothing. See `shaders/fringe.ts`.
|
|
3741
|
+
*/
|
|
3742
|
+
setChromaticAberration(intensity: number, start?: number): void;
|
|
3625
3743
|
/**
|
|
3626
3744
|
* Film grain, held until changed: an amplitude in display values (0 is none, 0.03 is a fine
|
|
3627
3745
|
* grain) and this frame's seed. **The seed is the caller's**, because the engine takes time from
|
|
@@ -3667,8 +3785,19 @@ export declare class WebGPURenderer implements RendererApi {
|
|
|
3667
3785
|
setGlobalMedium(density: number, albedo?: number, anisotropy?: number, maxDistance?: number): void;
|
|
3668
3786
|
/** How much speed blur the frame should resolve with, 0 to 1. */
|
|
3669
3787
|
setSpeedRush(strength: number): void;
|
|
3670
|
-
/**
|
|
3671
|
-
|
|
3788
|
+
/**
|
|
3789
|
+
* How much of the frame's motion blur to apply, 0 to 1, and the longest smear as a share of the
|
|
3790
|
+
* frame, both held until changed. See `RendererApi.setCameraMotionBlur`.
|
|
3791
|
+
*/
|
|
3792
|
+
setCameraMotionBlur(scale: number, maxShare?: number): void;
|
|
3793
|
+
/** The longest smear, as a share of the frame. See `setCameraMotionBlur`. */
|
|
3794
|
+
private motionBlurMax;
|
|
3795
|
+
private warnedObjectBlur;
|
|
3796
|
+
/**
|
|
3797
|
+
* Said once: a draw named where it was last frame while the frame blurs, and this frame keeps no
|
|
3798
|
+
* motion target to blur it by — the camera's motion alone smears it. See `OBJECT_BLUR_UNKEPT`.
|
|
3799
|
+
*/
|
|
3800
|
+
private warnObjectBlur;
|
|
3672
3801
|
/**
|
|
3673
3802
|
* The camera has cut: this frame is a new shot, not the next moment of the last one.
|
|
3674
3803
|
*
|