@hology/webgpu-renderer 0.1.9 → 0.1.11
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/index.d.ts +12 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -272,6 +272,7 @@ interface ExtractedSpotLight {
|
|
|
272
272
|
shadowCameraNear: number;
|
|
273
273
|
shadowCameraFar: number;
|
|
274
274
|
shadowCameraFov: number;
|
|
275
|
+
map: Texture | null;
|
|
275
276
|
}
|
|
276
277
|
|
|
277
278
|
/** Camera-visible lights collected during the renderer's scene extraction. */
|
|
@@ -281,7 +282,7 @@ type RendererExtractedLightState = ExtractedLightState;
|
|
|
281
282
|
* without mutating the scene's material slots. Return `undefined` to use the
|
|
282
283
|
* renderer fallback material, or `null` to intentionally skip the draw.
|
|
283
284
|
*/
|
|
284
|
-
type RendererMaterialResolver = (material: Material, pass?: 'opaque' | 'late') => WGSLShaderMaterial | null | undefined;
|
|
285
|
+
type RendererMaterialResolver = (material: Material, pass?: 'opaque' | 'late' | 'outline') => WGSLShaderMaterial | null | undefined;
|
|
285
286
|
interface RendererOptions {
|
|
286
287
|
canvas: HTMLCanvasElement;
|
|
287
288
|
/** Linear-sRGB clear color. Presentation converts it to display sRGB. */
|
|
@@ -439,6 +440,7 @@ interface RendererSceneLightingResources {
|
|
|
439
440
|
readonly directionalShadowView: GPUTextureView;
|
|
440
441
|
readonly pointShadowView: GPUTextureView;
|
|
441
442
|
readonly spotShadowView: GPUTextureView;
|
|
443
|
+
readonly spotLightMapView: GPUTextureView;
|
|
442
444
|
}
|
|
443
445
|
interface RendererCustomPassDescriptor {
|
|
444
446
|
readonly name: string;
|
|
@@ -778,6 +780,10 @@ type ToonOutlineParameters = {
|
|
|
778
780
|
thickness?: number;
|
|
779
781
|
/** Linear RGB outline color. Defaults to black. */
|
|
780
782
|
color?: readonly [number, number, number] | readonly number[];
|
|
783
|
+
/** Outline color source. Missing values preserve the legacy fixed-color behavior. */
|
|
784
|
+
colorMode?: "fixed" | "darkenedAlbedo";
|
|
785
|
+
/** Linear albedo darkening from 0 (unchanged) to 1 (black). Defaults to 0.65. */
|
|
786
|
+
darkening?: number;
|
|
781
787
|
/** Defaults to the source material's opacity. */
|
|
782
788
|
alpha?: number;
|
|
783
789
|
/** Set to false to suppress the otherwise enabled outline. */
|
|
@@ -930,6 +936,10 @@ declare class WebGpuRenderer {
|
|
|
930
936
|
private readonly cameraUniformScratch;
|
|
931
937
|
private readonly temporalVisibilityUniformScratch;
|
|
932
938
|
private readonly lightUniformScratch;
|
|
939
|
+
private spotLightMapAtlasSignature;
|
|
940
|
+
private spotLightMapAtlasSize;
|
|
941
|
+
private spotLightMapAtlasLayout;
|
|
942
|
+
private spotLightMapAtlasPipeline;
|
|
933
943
|
private readonly csmCascadeRanges;
|
|
934
944
|
private csmCascadeCount;
|
|
935
945
|
private csmCascadeLights;
|
|
@@ -1232,6 +1242,7 @@ declare class WebGpuRenderer {
|
|
|
1232
1242
|
private updateTemporalVisibilityUniforms;
|
|
1233
1243
|
private commitTemporalHiZHistory;
|
|
1234
1244
|
private updateLightUniforms;
|
|
1245
|
+
private updateSpotLightMapAtlas;
|
|
1235
1246
|
private writeShadowCameraBuffer;
|
|
1236
1247
|
}
|
|
1237
1248
|
|