@woosh/meep-engine 3.63.3 → 3.64.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/CHANGELOG.md +51 -0
- package/package.json +1 -1
- package/src/core/color/xyz/m3_chromatic_adaptation_bradford.d.ts +14 -0
- package/src/core/color/xyz/m3_chromatic_adaptation_bradford.d.ts.map +1 -0
- package/src/core/color/xyz/m3_chromatic_adaptation_bradford.js +51 -0
- package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.d.ts +2 -1
- package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.d.ts.map +1 -1
- package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.js +51 -70
- package/src/core/math/linalg/eigen/matrix_symmetric_4x4_eigen.d.ts.map +1 -1
- package/src/core/math/linalg/eigen/matrix_symmetric_4x4_eigen.js +8 -64
- package/src/core/math/linalg/eigen/matrix_symmetric_jacobi_rotate_in_place.d.ts +17 -0
- package/src/core/math/linalg/eigen/matrix_symmetric_jacobi_rotate_in_place.d.ts.map +1 -0
- package/src/core/math/linalg/eigen/matrix_symmetric_jacobi_rotate_in_place.js +64 -0
- package/src/core/math/linalg/solve_box_constrained_qp.d.ts +30 -0
- package/src/core/math/linalg/solve_box_constrained_qp.d.ts.map +1 -0
- package/src/core/math/linalg/solve_box_constrained_qp.js +205 -0
- package/src/engine/graphics/texture/sampler/exr_to_sampler2d.d.ts +27 -0
- package/src/engine/graphics/texture/sampler/exr_to_sampler2d.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/exr_to_sampler2d.js +91 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_exr.d.ts +23 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_exr.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_exr.js +64 -0
- package/src/engine/physics/constraint/soft_spring_coefficients.d.ts +24 -0
- package/src/engine/physics/constraint/soft_spring_coefficients.d.ts.map +1 -0
- package/src/engine/physics/constraint/soft_spring_coefficients.js +38 -0
- package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
- package/src/engine/physics/constraint/solve_constraints.js +16 -8
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +54 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +192 -7
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts +3 -5
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts.map +1 -1
- package/src/engine/physics/inertia/world_inverse_inertia.js +3 -5
- package/src/engine/physics/vehicle/RaycastVehicle.d.ts +183 -12
- package/src/engine/physics/vehicle/RaycastVehicle.d.ts.map +1 -1
- package/src/engine/physics/vehicle/RaycastVehicle.js +1046 -121
- package/src/format/image/exr/ExrCompression.d.ts +22 -0
- package/src/format/image/exr/ExrCompression.d.ts.map +1 -0
- package/src/format/image/exr/ExrCompression.js +27 -0
- package/src/format/image/exr/ExrImage.d.ts +32 -0
- package/src/format/image/exr/ExrImage.d.ts.map +1 -0
- package/src/format/image/exr/ExrImage.js +32 -0
- package/src/format/image/exr/ExrPixelType.d.ts +13 -0
- package/src/format/image/exr/ExrPixelType.d.ts.map +1 -0
- package/src/format/image/exr/ExrPixelType.js +18 -0
- package/src/format/image/exr/exr_compare_names.d.ts +16 -0
- package/src/format/image/exr/exr_compare_names.d.ts.map +1 -0
- package/src/format/image/exr/exr_compare_names.js +25 -0
- package/src/format/image/exr/exr_constants.d.ts +49 -0
- package/src/format/image/exr/exr_constants.d.ts.map +1 -0
- package/src/format/image/exr/exr_constants.js +56 -0
- package/src/format/image/exr/exr_read.d.ts +32 -0
- package/src/format/image/exr/exr_read.d.ts.map +1 -0
- package/src/format/image/exr/exr_read.js +531 -0
- package/src/format/image/exr/exr_sample_bits.d.ts +16 -0
- package/src/format/image/exr/exr_sample_bits.d.ts.map +1 -0
- package/src/format/image/exr/exr_sample_bits.js +21 -0
- package/src/format/image/exr/exr_scanlines_per_chunk.d.ts +17 -0
- package/src/format/image/exr/exr_scanlines_per_chunk.d.ts.map +1 -0
- package/src/format/image/exr/exr_scanlines_per_chunk.js +31 -0
- package/src/format/image/exr/exr_write.d.ts +27 -0
- package/src/format/image/exr/exr_write.d.ts.map +1 -0
- package/src/format/image/exr/exr_write.js +378 -0
- package/src/shade/playground/probe_clipmap/index.html +5 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +34 -1
- package/src/shade/playground/tonemap_sdr/README.md +11 -8
- package/src/shade/playground/tonemap_sdr/ToneMapCompare.js +2 -2
- package/src/shade/renderer/Renderer.d.ts +5 -6
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +15 -88
- package/src/shade/renderer/animation/chunk_animation_curve_evaluate_keys.d.ts +14 -0
- package/src/shade/renderer/animation/chunk_animation_curve_evaluate_keys.d.ts.map +1 -0
- package/src/shade/renderer/animation/chunk_animation_curve_evaluate_keys.js +62 -0
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts +158 -0
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/ColorGrade.js +337 -0
- package/src/shade/renderer/deferred/tonemap/SAMPLER_TONEMAP_LUT.d.ts +9 -0
- package/src/shade/renderer/deferred/tonemap/SAMPLER_TONEMAP_LUT.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/SAMPLER_TONEMAP_LUT.js +15 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.d.ts +6 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js +84 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_GT7.d.ts +10 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_GT7.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_GT7.js +25 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_NONE.d.ts +9 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_NONE.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_NONE.js +20 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_PBR_NEUTRAL.d.ts +14 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_PBR_NEUTRAL.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_PBR_NEUTRAL.js +30 -0
- package/src/shade/renderer/deferred/tonemap/ToneMapOperator.d.ts +54 -0
- package/src/shade/renderer/deferred/tonemap/ToneMapOperator.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/ToneMapOperator.js +63 -0
- package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts +106 -0
- package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/ToneMapper.js +474 -0
- package/src/shade/renderer/deferred/tonemap/TonemapAces2Tables.d.ts +5 -13
- package/src/shade/renderer/deferred/tonemap/TonemapAces2Tables.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/TonemapAces2Tables.js +5 -44
- package/src/shade/renderer/deferred/tonemap/TonemapDisplaySettings.d.ts +7 -25
- package/src/shade/renderer/deferred/tonemap/TonemapDisplaySettings.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/TonemapDisplaySettings.js +11 -51
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts +20 -0
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.js +103 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_lut.d.ts +9 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_lut.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/{shader_tonemap_HDR_none.js → shader_tonemap_HDR_lut.js} +22 -18
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_lut.d.ts +9 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_lut.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/{shader_tonemap_LDR_aces.js → shader_tonemap_LDR_lut.js} +24 -24
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_lut_bake.d.ts +23 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_lut_bake.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_lut_bake.js +92 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_lut_sdr_from_hdr.d.ts +15 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_lut_sdr_from_hdr.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_lut_sdr_from_hdr.js +73 -0
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +3 -15
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +4 -17
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +3 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +15 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +7 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +28 -17
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +18 -18
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js +44 -48
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts +22 -0
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js +62 -0
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.d.ts +13 -0
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.js +140 -0
- package/src/shade/renderer/shader/chunk/color/oklab/chunk_oklab_compute_max_saturation.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/color/oklab/chunk_oklab_compute_max_saturation.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/oklab/chunk_oklab_compute_max_saturation.js +65 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_bt2390_eetf.d.ts +14 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_bt2390_eetf.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_bt2390_eetf.js +38 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_lut.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_lut.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_lut.js +41 -0
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +8 -0
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +21 -3
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +8 -8
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +2 -0
- package/src/shade/renderer/ShadeToneMappingMode.d.ts +0 -15
- package/src/shade/renderer/ShadeToneMappingMode.d.ts.map +0 -1
- package/src/shade/renderer/ShadeToneMappingMode.js +0 -41
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR.d.ts +0 -9
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR.js +0 -79
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_aces.d.ts +0 -17
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_aces.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_aces.js +0 -101
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_none.d.ts +0 -9
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_none.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_pbr_neutral.d.ts +0 -10
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_pbr_neutral.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_pbr_neutral.js +0 -80
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR.d.ts +0 -9
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR.js +0 -80
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_aces.d.ts +0 -10
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_aces.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_none.d.ts +0 -9
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_none.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_none.js +0 -71
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_pbr_neutral.d.ts +0 -10
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_pbr_neutral.d.ts.map +0 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_pbr_neutral.js +0 -76
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_hdr_bt2390.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_hdr_bt2390.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_hdr_bt2390.js +0 -44
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { BinaryBuffer } from "../../../core/binary/BinaryBuffer.js";
|
|
2
|
+
import { compress_bytes } from "../../../core/binary/compression/compress_bytes.js";
|
|
3
|
+
import { EndianType } from "../../../core/binary/EndianType.js";
|
|
4
|
+
import { utf8_encode_into } from "../../../core/binary/utf8/utf8_encode_into.js";
|
|
5
|
+
import { utf8_encoded_length } from "../../../core/binary/utf8/utf8_encoded_length.js";
|
|
6
|
+
import {
|
|
7
|
+
EXR_FLAG_LONG_NAMES,
|
|
8
|
+
EXR_LONG_NAME_BYTES,
|
|
9
|
+
EXR_MAGIC,
|
|
10
|
+
EXR_SHORT_NAME_BYTES,
|
|
11
|
+
EXR_VERSION
|
|
12
|
+
} from "./exr_constants.js";
|
|
13
|
+
import { exr_compare_names } from "./exr_compare_names.js";
|
|
14
|
+
import { exr_sample_bits } from "./exr_sample_bits.js";
|
|
15
|
+
import { exr_scanlines_per_chunk } from "./exr_scanlines_per_chunk.js";
|
|
16
|
+
import { ExrCompression } from "./ExrCompression.js";
|
|
17
|
+
import { ExrPixelType } from "./ExrPixelType.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The largest value of the format's signed 32-bit fields: a chunk's size, and the data window's corners.
|
|
21
|
+
*
|
|
22
|
+
* @readonly
|
|
23
|
+
* @type {number}
|
|
24
|
+
*/
|
|
25
|
+
const INT32_MAX = 0x7FFFFFFF;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Write an image as a scanline OpenEXR file.
|
|
29
|
+
*
|
|
30
|
+
* Each channel is written in the pixel type its array holds — a `Float16Array` as HALF, a `Float32Array`
|
|
31
|
+
* as FLOAT, a `Uint32Array` as UINT — and its samples go into the file as the bits they are. The header
|
|
32
|
+
* carries OpenEXR's required attributes and nothing else: both windows at the origin exactly covering the
|
|
33
|
+
* pixels, increasing line order, square pixels and the default screen window.
|
|
34
|
+
*
|
|
35
|
+
* Under {@link ExrCompression.ZIP} and {@link ExrCompression.ZIPS} a chunk that deflate does not make
|
|
36
|
+
* smaller is stored as it is, as OpenEXR's own writer does and every reader expects.
|
|
37
|
+
*
|
|
38
|
+
* The channels' arrays are read chunk by chunk as earlier chunks are compressed, so keep them unchanged
|
|
39
|
+
* until the promise settles.
|
|
40
|
+
*
|
|
41
|
+
* @param {ExrImage} image channels in any order, with distinct names of 1 to 255 bytes in UTF-8
|
|
42
|
+
* @param {ExrCompression} compression {@link ExrCompression.None}, {@link ExrCompression.ZIPS} or
|
|
43
|
+
* {@link ExrCompression.ZIP}
|
|
44
|
+
* @returns {Promise<ArrayBuffer>} the whole file
|
|
45
|
+
* @throws {Error} naming what about the image or the compression method cannot be written
|
|
46
|
+
*
|
|
47
|
+
* @see https://openexr.com/en/latest/OpenEXRFileLayout.html
|
|
48
|
+
* @author Alex Goldring
|
|
49
|
+
* @copyright Company Named Limited (c) 2026
|
|
50
|
+
*/
|
|
51
|
+
export async function exr_write(image, compression) {
|
|
52
|
+
const width = image.width;
|
|
53
|
+
const height = image.height;
|
|
54
|
+
|
|
55
|
+
// the data window's corners are signed 32-bit integers
|
|
56
|
+
if (!Number.isInteger(width) || !Number.isInteger(height) || width < 1 || height < 1
|
|
57
|
+
|| width - 1 > INT32_MAX || height - 1 > INT32_MAX) {
|
|
58
|
+
throw new Error(`EXR: cannot write a ${width}x${height} image; a side is 1 to 2^31 pixels`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const scanlines_per_chunk = exr_scanlines_per_chunk(compression);
|
|
62
|
+
|
|
63
|
+
const channels = sort_channels(image.channels, width * height);
|
|
64
|
+
const channel_count = channels.length;
|
|
65
|
+
|
|
66
|
+
let pixel_bytes = 0;
|
|
67
|
+
let long_names = false;
|
|
68
|
+
|
|
69
|
+
const plane_bits = new Array(channel_count);
|
|
70
|
+
|
|
71
|
+
for (let c = 0; c < channel_count; c++) {
|
|
72
|
+
const channel = channels[c];
|
|
73
|
+
|
|
74
|
+
pixel_bytes += channel.data.BYTES_PER_ELEMENT;
|
|
75
|
+
long_names ||= channel.name_bytes.length > EXR_SHORT_NAME_BYTES;
|
|
76
|
+
|
|
77
|
+
plane_bits[c] = exr_sample_bits(channel.data);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const line_bytes = width * pixel_bytes;
|
|
81
|
+
const chunk_bytes = Math.min(scanlines_per_chunk, height) * line_bytes;
|
|
82
|
+
|
|
83
|
+
if (chunk_bytes > INT32_MAX) {
|
|
84
|
+
throw new Error(`EXR: a chunk of this image would be ${chunk_bytes} bytes, more than a chunk's 32-bit size holds`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const chunk_count = Math.ceil(height / scanlines_per_chunk);
|
|
88
|
+
|
|
89
|
+
const buffer = new BinaryBuffer();
|
|
90
|
+
|
|
91
|
+
// OpenEXR is little-endian throughout
|
|
92
|
+
buffer.endianness = EndianType.LittleEndian;
|
|
93
|
+
|
|
94
|
+
buffer.writeUint32(EXR_MAGIC);
|
|
95
|
+
buffer.writeUint32(long_names ? EXR_VERSION | EXR_FLAG_LONG_NAMES : EXR_VERSION);
|
|
96
|
+
|
|
97
|
+
write_header(buffer, channels, compression, width, height);
|
|
98
|
+
|
|
99
|
+
// No chunk is stored larger than its scanlines, so this bounds the file: the output is allocated
|
|
100
|
+
// once, and uncompressed it is exactly the file.
|
|
101
|
+
buffer.setCapacity(buffer.position + chunk_count * 16 + height * line_bytes);
|
|
102
|
+
|
|
103
|
+
// each entry is known once its chunk has been written; reserve the table and fill it in as they are
|
|
104
|
+
const table_offset = buffer.position;
|
|
105
|
+
|
|
106
|
+
for (let i = 0; i < chunk_count; i++) {
|
|
107
|
+
buffer.writeUint64(0n);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const raw = new BinaryBuffer();
|
|
111
|
+
|
|
112
|
+
raw.endianness = EndianType.LittleEndian;
|
|
113
|
+
raw.setCapacity(chunk_bytes);
|
|
114
|
+
|
|
115
|
+
const prepared = compression === ExrCompression.None ? null : new Uint8Array(chunk_bytes);
|
|
116
|
+
|
|
117
|
+
for (let i = 0; i < chunk_count; i++) {
|
|
118
|
+
const first_line = i * scanlines_per_chunk;
|
|
119
|
+
const line_count = Math.min(scanlines_per_chunk, height - first_line);
|
|
120
|
+
const unpacked_size = line_count * line_bytes;
|
|
121
|
+
|
|
122
|
+
raw.position = 0;
|
|
123
|
+
|
|
124
|
+
write_scanlines(raw, plane_bits, width, first_line, line_count);
|
|
125
|
+
|
|
126
|
+
let payload = raw.raw_bytes;
|
|
127
|
+
let payload_size = unpacked_size;
|
|
128
|
+
|
|
129
|
+
if (prepared !== null) {
|
|
130
|
+
zip_prepare(raw.raw_bytes, prepared, unpacked_size);
|
|
131
|
+
|
|
132
|
+
const compressed = await compress_bytes([prepared.subarray(0, unpacked_size)], "deflate");
|
|
133
|
+
|
|
134
|
+
if (compressed.length < unpacked_size) {
|
|
135
|
+
payload = compressed;
|
|
136
|
+
payload_size = compressed.length;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const offset = buffer.position;
|
|
141
|
+
|
|
142
|
+
buffer.position = table_offset + i * 8;
|
|
143
|
+
buffer.writeUint64(BigInt(offset));
|
|
144
|
+
buffer.position = offset;
|
|
145
|
+
|
|
146
|
+
// the data window starts at the origin, so a chunk's scanline is its first row
|
|
147
|
+
buffer.writeInt32(first_line);
|
|
148
|
+
buffer.writeInt32(payload_size);
|
|
149
|
+
buffer.writeBytes(payload, 0, payload_size);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
buffer.trim();
|
|
153
|
+
|
|
154
|
+
return buffer.data;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Check the channels and sort them by {@link exr_compare_names}, which is the order a file lists them in
|
|
159
|
+
* and lays out their samples in.
|
|
160
|
+
*
|
|
161
|
+
* @param {ExrChannel[]} channels
|
|
162
|
+
* @param {number} sample_count every channel's
|
|
163
|
+
* @returns {{name: string, name_bytes: Uint8Array, data: (Float16Array|Float32Array|Uint32Array), pixel_type: ExrPixelType}[]}
|
|
164
|
+
*/
|
|
165
|
+
function sort_channels(channels, sample_count) {
|
|
166
|
+
const channel_count = channels.length;
|
|
167
|
+
|
|
168
|
+
if (channel_count === 0) {
|
|
169
|
+
throw new Error("EXR: the image has no channels");
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const result = new Array(channel_count);
|
|
173
|
+
|
|
174
|
+
for (let c = 0; c < channel_count; c++) {
|
|
175
|
+
const { name, data } = channels[c];
|
|
176
|
+
|
|
177
|
+
if (typeof name !== "string" || name.length === 0 || name.includes("\0")) {
|
|
178
|
+
throw new Error(`EXR: channel name '${name}' is not a non-empty string without a null`);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const name_bytes = new Uint8Array(utf8_encoded_length(name));
|
|
182
|
+
|
|
183
|
+
utf8_encode_into(name, name_bytes, 0);
|
|
184
|
+
|
|
185
|
+
if (name_bytes.length > EXR_LONG_NAME_BYTES) {
|
|
186
|
+
throw new Error(`EXR: channel name '${name}' is ${name_bytes.length} bytes in UTF-8, more than ${EXR_LONG_NAME_BYTES}`);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
let pixel_type;
|
|
190
|
+
|
|
191
|
+
if (data instanceof Float16Array) {
|
|
192
|
+
pixel_type = ExrPixelType.HALF;
|
|
193
|
+
} else if (data instanceof Float32Array) {
|
|
194
|
+
pixel_type = ExrPixelType.FLOAT;
|
|
195
|
+
} else if (data instanceof Uint32Array) {
|
|
196
|
+
pixel_type = ExrPixelType.UINT;
|
|
197
|
+
} else {
|
|
198
|
+
throw new Error(
|
|
199
|
+
`EXR: channel '${name}' holds ${data?.constructor?.name};`
|
|
200
|
+
+ ` samples are Float16Array (HALF), Float32Array (FLOAT) or Uint32Array (UINT)`
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (data.length !== sample_count) {
|
|
205
|
+
throw new Error(`EXR: channel '${name}' holds ${data.length} samples, where the image has ${sample_count}`);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
result[c] = { name, name_bytes, data, pixel_type };
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
result.sort((a, b) => exr_compare_names(a.name_bytes, b.name_bytes));
|
|
212
|
+
|
|
213
|
+
for (let c = 1; c < channel_count; c++) {
|
|
214
|
+
if (exr_compare_names(result[c - 1].name_bytes, result[c].name_bytes) === 0) {
|
|
215
|
+
throw new Error(`EXR: there are two channels named '${result[c].name}'`);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return result;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Write the header: OpenEXR's required attributes, in its order, then the terminator.
|
|
224
|
+
*
|
|
225
|
+
* @param {BinaryBuffer} buffer
|
|
226
|
+
* @param {{name_bytes: Uint8Array, pixel_type: ExrPixelType}[]} channels sorted by name
|
|
227
|
+
* @param {ExrCompression} compression
|
|
228
|
+
* @param {number} width
|
|
229
|
+
* @param {number} height
|
|
230
|
+
*/
|
|
231
|
+
function write_header(buffer, channels, compression, width, height) {
|
|
232
|
+
let channel_list_bytes = 1;
|
|
233
|
+
|
|
234
|
+
for (let c = 0; c < channels.length; c++) {
|
|
235
|
+
// name and terminator; pixel type; pLinear and three reserved bytes; x and y sampling
|
|
236
|
+
channel_list_bytes += channels[c].name_bytes.length + 1 + 4 + 4 + 8;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
write_attribute(buffer, "channels", "chlist", channel_list_bytes);
|
|
240
|
+
|
|
241
|
+
for (let c = 0; c < channels.length; c++) {
|
|
242
|
+
const name_bytes = channels[c].name_bytes;
|
|
243
|
+
|
|
244
|
+
buffer.writeBytes(name_bytes, 0, name_bytes.length);
|
|
245
|
+
buffer.writeUint8(0);
|
|
246
|
+
|
|
247
|
+
buffer.writeInt32(channels[c].pixel_type);
|
|
248
|
+
buffer.writeUint32(0);
|
|
249
|
+
buffer.writeInt32(1);
|
|
250
|
+
buffer.writeInt32(1);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
buffer.writeUint8(0);
|
|
254
|
+
|
|
255
|
+
write_attribute(buffer, "compression", "compression", 1);
|
|
256
|
+
buffer.writeUint8(compression);
|
|
257
|
+
|
|
258
|
+
write_attribute(buffer, "dataWindow", "box2i", 16);
|
|
259
|
+
write_window(buffer, width, height);
|
|
260
|
+
|
|
261
|
+
write_attribute(buffer, "displayWindow", "box2i", 16);
|
|
262
|
+
write_window(buffer, width, height);
|
|
263
|
+
|
|
264
|
+
// increasing Y
|
|
265
|
+
write_attribute(buffer, "lineOrder", "lineOrder", 1);
|
|
266
|
+
buffer.writeUint8(0);
|
|
267
|
+
|
|
268
|
+
write_attribute(buffer, "pixelAspectRatio", "float", 4);
|
|
269
|
+
buffer.writeFloat32(1);
|
|
270
|
+
|
|
271
|
+
write_attribute(buffer, "screenWindowCenter", "v2f", 8);
|
|
272
|
+
buffer.writeFloat32(0);
|
|
273
|
+
buffer.writeFloat32(0);
|
|
274
|
+
|
|
275
|
+
write_attribute(buffer, "screenWindowWidth", "float", 4);
|
|
276
|
+
buffer.writeFloat32(1);
|
|
277
|
+
|
|
278
|
+
buffer.writeUint8(0);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @param {BinaryBuffer} buffer
|
|
283
|
+
* @param {string} name
|
|
284
|
+
* @param {string} type
|
|
285
|
+
* @param {number} size bytes of the value that follows
|
|
286
|
+
*/
|
|
287
|
+
function write_attribute(buffer, name, type, size) {
|
|
288
|
+
write_name(buffer, name);
|
|
289
|
+
write_name(buffer, type);
|
|
290
|
+
|
|
291
|
+
buffer.writeInt32(size);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @param {BinaryBuffer} buffer
|
|
296
|
+
* @param {string} name ASCII
|
|
297
|
+
*/
|
|
298
|
+
function write_name(buffer, name) {
|
|
299
|
+
buffer.writeASCIIString(name);
|
|
300
|
+
buffer.writeUint8(0);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* A `box2i` from the origin to the last pixel.
|
|
305
|
+
*
|
|
306
|
+
* @param {BinaryBuffer} buffer
|
|
307
|
+
* @param {number} width
|
|
308
|
+
* @param {number} height
|
|
309
|
+
*/
|
|
310
|
+
function write_window(buffer, width, height) {
|
|
311
|
+
buffer.writeInt32(0);
|
|
312
|
+
buffer.writeInt32(0);
|
|
313
|
+
buffer.writeInt32(width - 1);
|
|
314
|
+
buffer.writeInt32(height - 1);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Gather a chunk's scanlines from the channel planes — the inverse of `read_scanlines` in `exr_read`.
|
|
319
|
+
*
|
|
320
|
+
* @param {BinaryBuffer} destination
|
|
321
|
+
* @param {(Uint16Array|Uint32Array)[]} plane_bits in channel list order
|
|
322
|
+
* @param {number} width
|
|
323
|
+
* @param {number} first_line
|
|
324
|
+
* @param {number} line_count
|
|
325
|
+
*/
|
|
326
|
+
function write_scanlines(destination, plane_bits, width, first_line, line_count) {
|
|
327
|
+
const channel_count = plane_bits.length;
|
|
328
|
+
|
|
329
|
+
for (let line = first_line; line < first_line + line_count; line++) {
|
|
330
|
+
const row = line * width;
|
|
331
|
+
|
|
332
|
+
for (let c = 0; c < channel_count; c++) {
|
|
333
|
+
const bits = plane_bits[c];
|
|
334
|
+
|
|
335
|
+
if (bits.BYTES_PER_ELEMENT === 2) {
|
|
336
|
+
destination.writeUint16Array(bits, row, width);
|
|
337
|
+
} else {
|
|
338
|
+
destination.writeUint32Array(bits, row, width);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Transform a chunk the way ZIP compression does before deflating it — the inverse of
|
|
346
|
+
* `zip_reconstruct` in `exr_read`.
|
|
347
|
+
*
|
|
348
|
+
* The bytes at even positions are moved ahead of those at odd ones — for half floats, the low bytes of
|
|
349
|
+
* the samples ahead of their high bytes — and the result is delta-coded byte by byte with a bias of
|
|
350
|
+
* 128, which turns smooth image data into the small, repetitive values deflate codes cheaply.
|
|
351
|
+
*
|
|
352
|
+
* @param {Uint8Array} source the chunk's pixel data
|
|
353
|
+
* @param {Uint8Array} destination
|
|
354
|
+
* @param {number} length bytes, at least one
|
|
355
|
+
*/
|
|
356
|
+
function zip_prepare(source, destination, length) {
|
|
357
|
+
const half = (length + 1) >> 1;
|
|
358
|
+
|
|
359
|
+
let previous = source[0];
|
|
360
|
+
|
|
361
|
+
destination[0] = previous;
|
|
362
|
+
|
|
363
|
+
for (let i = 1; i < half; i++) {
|
|
364
|
+
const value = source[2 * i];
|
|
365
|
+
|
|
366
|
+
destination[i] = value - previous + 128;
|
|
367
|
+
|
|
368
|
+
previous = value;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
for (let i = half; i < length; i++) {
|
|
372
|
+
const value = source[2 * (i - half) + 1];
|
|
373
|
+
|
|
374
|
+
destination[i] = value - previous + 128;
|
|
375
|
+
|
|
376
|
+
previous = value;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
@@ -124,6 +124,11 @@
|
|
|
124
124
|
|
|
125
125
|
<hr>
|
|
126
126
|
|
|
127
|
+
<label>
|
|
128
|
+
<input type="checkbox" id="sun" checked>
|
|
129
|
+
<span>Sun <span class="hint">— the directional light; L flips it</span></span>
|
|
130
|
+
</label>
|
|
131
|
+
|
|
127
132
|
<label>
|
|
128
133
|
<span>Sun height</span>
|
|
129
134
|
<input type="range" id="sun_elevation" min="2" max="88" value="62">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/probe_clipmap/main.js"],"names":[],"mappings":"AAyFA;;;;;GAKG;AACH,yBAFa,QAAQ,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/probe_clipmap/main.js"],"names":[],"mappings":"AAyFA;;;;;GAKG;AACH,yBAFa,QAAQ,IAAI,CAAC,CAuUzB"}
|
|
@@ -178,7 +178,11 @@ export async function start() {
|
|
|
178
178
|
// a sun the sliders turn, whatever lights the file brought
|
|
179
179
|
const sun = make_sunlight({ intensity: 7.2 });
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
/**
|
|
182
|
+
* The sun's entity while it is in the scene, -1 while the toggle has it out.
|
|
183
|
+
* @type {number}
|
|
184
|
+
*/
|
|
185
|
+
let sun_entity = place_light(scene, sun);
|
|
182
186
|
|
|
183
187
|
const rotation = new Quaternion();
|
|
184
188
|
const sun_direction = new Vector3();
|
|
@@ -229,6 +233,33 @@ export async function start() {
|
|
|
229
233
|
element('sun_elevation').addEventListener('input', on_sun_input);
|
|
230
234
|
element('sun_azimuth').addEventListener('input', on_sun_input);
|
|
231
235
|
|
|
236
|
+
const sun_toggle = element('sun');
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Take the sun out of the scene, or put it back; out, it is gone from the lights, its shadows and the
|
|
240
|
+
* probes' hits alike, rather than dimmed to nothing.
|
|
241
|
+
* @param {boolean} enabled
|
|
242
|
+
*/
|
|
243
|
+
function set_sun(enabled) {
|
|
244
|
+
sun_toggle.checked = enabled;
|
|
245
|
+
|
|
246
|
+
if (enabled === (sun_entity !== -1)) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (enabled) {
|
|
251
|
+
sun_entity = place_light(scene, sun);
|
|
252
|
+
} else {
|
|
253
|
+
scene.lights.remove(sun);
|
|
254
|
+
scene.dataset.removeEntity(sun_entity);
|
|
255
|
+
sun_entity = -1;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
lights_changed();
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
sun_toggle.addEventListener('change', event => set_sun(event.target.checked));
|
|
262
|
+
|
|
232
263
|
load_default_environment(scene);
|
|
233
264
|
|
|
234
265
|
// ---- controls -------------------------------------------------------------------------
|
|
@@ -311,6 +342,8 @@ export async function start() {
|
|
|
311
342
|
} else if (event.code === 'KeyT') {
|
|
312
343
|
ray_resampling_toggle.checked = !ray_resampling_toggle.checked;
|
|
313
344
|
renderer.probe_clipmap.ray_resampling = ray_resampling_toggle.checked;
|
|
345
|
+
} else if (event.code === 'KeyL') {
|
|
346
|
+
set_sun(sun_entity === -1);
|
|
314
347
|
}
|
|
315
348
|
});
|
|
316
349
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
# Tone mapping: GT7 and PBR Neutral, SDR and HDR
|
|
2
2
|
|
|
3
|
-
The renderer has four
|
|
3
|
+
The renderer's `ToneMapper` has four built-in operators, each one choice for every output (`renderer.tone_mapper.operator`):
|
|
4
4
|
|
|
5
|
-
- `
|
|
6
|
-
- `
|
|
7
|
-
- `
|
|
8
|
-
- `
|
|
5
|
+
- `TONE_MAP_OPERATOR_ACES`, the default: Unreal Engine's look;
|
|
6
|
+
- `TONE_MAP_OPERATOR_GT7`;
|
|
7
|
+
- `TONE_MAP_OPERATOR_PBR_NEUTRAL`;
|
|
8
|
+
- `TONE_MAP_OPERATOR_NONE`.
|
|
9
|
+
|
|
10
|
+
The tone mapper bakes the operator into a 3D LUT per output and draws through it; this page evaluates the operators
|
|
11
|
+
directly.
|
|
9
12
|
|
|
10
13
|
This page compares GT7 and PBR Neutral, and shows each one's HDR form beside its SDR form. ACES is not one of its
|
|
11
|
-
views; the engine's own canvas shows it, and `
|
|
14
|
+
views; the engine's own canvas shows it, and `TONE_MAP_OPERATOR_ACES.spec.js` holds it to Unreal's and OpenColorIO's numbers.
|
|
12
15
|
|
|
13
16
|
The engine renders and tonemaps each frame as usual. Two extensions then redraw the canvas from the HDR colour the
|
|
14
17
|
tonemapper was given:
|
|
@@ -16,8 +19,8 @@ tonemapper was given:
|
|
|
16
19
|
| | operator | source |
|
|
17
20
|
|---|---|---|
|
|
18
21
|
| 1 | GT7, Polyphony's sample | `chunk_tonemap_gt7_sdr_reference.js` beside this page: the sample code's `initializeAsSDR()`, SDR only |
|
|
19
|
-
| 2 | GT7, engine | `tonemap_gt7_rec2020` at `PAPER_WHITE_NITS · peak` and `PAPER_WHITE_NITS`, back in Rec.709, what `
|
|
20
|
-
| 3 | PBR Neutral, engine | `tonemap_khronos_pbr(c, peak)`, what `
|
|
22
|
+
| 2 | GT7, engine | `tonemap_gt7_rec2020` at `PAPER_WHITE_NITS · peak` and `PAPER_WHITE_NITS`, back in Rec.709, what `TONE_MAP_OPERATOR_GT7` runs |
|
|
23
|
+
| 3 | PBR Neutral, engine | `tonemap_khronos_pbr(c, peak)`, what `TONE_MAP_OPERATOR_PBR_NEUTRAL` runs; at peak 1 the Khronos specification |
|
|
21
24
|
|
|
22
25
|
All of them see the same input. Exposure is the page's own and fixed per scene, with the engine's automatic exposure off.
|
|
23
26
|
|
|
@@ -35,11 +35,11 @@ export const CompareOperator = {
|
|
|
35
35
|
GT7Reference: 0,
|
|
36
36
|
/**
|
|
37
37
|
* the engine's `tonemap_gt7` with the paper white at `PAPER_WHITE_NITS` and the peak at the headroom times that:
|
|
38
|
-
* what `
|
|
38
|
+
* what `TONE_MAP_OPERATOR_GT7` runs
|
|
39
39
|
*/
|
|
40
40
|
GT7: 1,
|
|
41
41
|
/**
|
|
42
|
-
* the engine's `tonemap_khronos_pbr` at the headroom: what `
|
|
42
|
+
* the engine's `tonemap_khronos_pbr` at the headroom: what `TONE_MAP_OPERATOR_PBR_NEUTRAL` runs, and at
|
|
43
43
|
* headroom 1 the Khronos specification
|
|
44
44
|
*/
|
|
45
45
|
PBRNeutral: 2,
|
|
@@ -54,12 +54,11 @@ export class Renderer {
|
|
|
54
54
|
*/
|
|
55
55
|
transparency_mode: ShadeTransparencyMode;
|
|
56
56
|
/**
|
|
57
|
-
* How the exposed scene colour becomes display colour, on every output
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* @type {ShadeToneMappingMode}
|
|
57
|
+
* How the exposed scene colour becomes display colour, on every output: its operator, the resolution of its LUTs,
|
|
58
|
+
* and LUTs of the user's own. Made by {@link initialize}.
|
|
59
|
+
* @type {ToneMapper}
|
|
61
60
|
*/
|
|
62
|
-
|
|
61
|
+
tone_mapper: ToneMapper;
|
|
63
62
|
/**
|
|
64
63
|
* Switches of the AVBOIT mode, read every frame while {@link transparency_mode} selects it.
|
|
65
64
|
* @type {AVBOITSettings}
|
|
@@ -579,7 +578,7 @@ import { ShadeIndirectLightingMode } from "./ShadeIndirectLightingMode.js";
|
|
|
579
578
|
import { MaterialDispatch } from "./material/dispatch/MaterialDispatch.js";
|
|
580
579
|
import { ProbeClipmapSettings } from "./global_illumination/probe_clipmap/ProbeClipmapSettings.js";
|
|
581
580
|
import { ShadeTransparencyMode } from "./ShadeTransparencyMode.js";
|
|
582
|
-
import {
|
|
581
|
+
import { ToneMapper } from "./deferred/tonemap/ToneMapper.js";
|
|
583
582
|
import { AVBOITSettings } from "./rasterize/native/avboit/AVBOITSettings.js";
|
|
584
583
|
import { ShaderSwitchSet } from "./shader/compiler/ShaderSwitchSet.js";
|
|
585
584
|
import { MotionBlur } from "./postprocess/motion_blur/MotionBlur.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Renderer.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/Renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Renderer.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/Renderer.js"],"names":[],"mappings":"AA6IA;IAOI,0BAEC;IAED;;OAEG;IACH,0BAAQ;IAER;;;;;;OAMG;IACH,kDAEC;IAED;;OAEG;IACH,kBAAO;IAYP;;;OAGG;IACH,2BAEC;IAaD,wCAGC;IAED,uCAEC;IAED;;;;OAIG;IACH,wBAFU,yBAAyB,CAEoB;IAEvD;;;;;;;OAOG;IACH,mBAFU,gBAAgB,CAEgB;IAE1C;;;;OAIG;IACH,eAFU,oBAAoB,CAEa;IAY3C;;;;;;;OAOG;IACH,mBAFU,qBAAqB,CAEkB;IAEjD;;;;OAIG;IACH,aAFU,UAAU,CAER;IAEZ;;;OAGG;IACH,QAFU,cAAc,CAEM;IAE9B;;;;;;;;;OASG;IACH,2BAFU,OAAO,CAEiB;IAElC,6BAA4B;IAC5B,8BAA4B;IAC5B;;;;OAIG;IACH,mCAAkC;IAClC;;;;;;;OAOG;IACH,mCAFU,OAAO,CAEyB;IAW1C,oCAIC;IAED,mCAEC;IAYD,oCAIC;IAED,mCAEC;IA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