@onerjs/core 8.51.4 → 8.51.5

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.
Files changed (173) hide show
  1. package/Animations/animatorAvatar.d.ts +2 -0
  2. package/Animations/animatorAvatar.js +163 -94
  3. package/Animations/animatorAvatar.js.map +1 -1
  4. package/Engines/constants.d.ts +10 -0
  5. package/Engines/constants.js +10 -0
  6. package/Engines/constants.js.map +1 -1
  7. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +6 -3
  8. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  9. package/Materials/PBR/openpbrMaterial.d.ts +8 -0
  10. package/Materials/PBR/openpbrMaterial.js +16 -0
  11. package/Materials/PBR/openpbrMaterial.js.map +1 -1
  12. package/Materials/PBR/pbrBaseMaterial.d.ts +1 -0
  13. package/Materials/PBR/pbrBaseMaterial.js +8 -0
  14. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  15. package/Materials/Textures/Procedurals/proceduralTexture.d.ts +6 -0
  16. package/Materials/Textures/Procedurals/proceduralTexture.js +3 -1
  17. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  18. package/Materials/Textures/index.d.ts +1 -0
  19. package/Materials/Textures/index.js +1 -0
  20. package/Materials/Textures/index.js.map +1 -1
  21. package/Materials/Textures/textureMerger.js +1 -0
  22. package/Materials/Textures/textureMerger.js.map +1 -1
  23. package/Materials/Textures/textureProcessor.d.ts +315 -0
  24. package/Materials/Textures/textureProcessor.js +792 -0
  25. package/Materials/Textures/textureProcessor.js.map +1 -0
  26. package/Materials/material.d.ts +24 -0
  27. package/Materials/material.js +39 -0
  28. package/Materials/material.js.map +1 -1
  29. package/Materials/standardMaterial.d.ts +1 -0
  30. package/Materials/standardMaterial.js +6 -0
  31. package/Materials/standardMaterial.js.map +1 -1
  32. package/Physics/v2/characterController.d.ts +104 -7
  33. package/Physics/v2/characterController.js +355 -7
  34. package/Physics/v2/characterController.js.map +1 -1
  35. package/Shaders/ShadersInclude/bumpFragment.js +3 -3
  36. package/Shaders/ShadersInclude/bumpFragment.js.map +1 -1
  37. package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js +5 -1
  38. package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
  39. package/Shaders/ShadersInclude/defaultFragmentDeclaration.js +3 -0
  40. package/Shaders/ShadersInclude/defaultFragmentDeclaration.js.map +1 -1
  41. package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
  42. package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  43. package/Shaders/ShadersInclude/defaultVertexDeclaration.js +1 -1
  44. package/Shaders/ShadersInclude/defaultVertexDeclaration.js.map +1 -1
  45. package/Shaders/ShadersInclude/openpbrAmbientOcclusionData.js +1 -1
  46. package/Shaders/ShadersInclude/openpbrAmbientOcclusionData.js.map +1 -1
  47. package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
  48. package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
  49. package/Shaders/ShadersInclude/openpbrBaseLayerData.js +14 -14
  50. package/Shaders/ShadersInclude/openpbrBaseLayerData.js.map +1 -1
  51. package/Shaders/ShadersInclude/openpbrCoatLayerData.js +6 -6
  52. package/Shaders/ShadersInclude/openpbrCoatLayerData.js.map +1 -1
  53. package/Shaders/ShadersInclude/openpbrDirectLighting.js +1 -1
  54. package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -1
  55. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +1 -1
  56. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
  57. package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js +3 -0
  58. package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js.map +1 -1
  59. package/Shaders/ShadersInclude/openpbrFuzzLayerData.js +3 -3
  60. package/Shaders/ShadersInclude/openpbrFuzzLayerData.js.map +1 -1
  61. package/Shaders/ShadersInclude/openpbrNormalMapFragment.js +4 -4
  62. package/Shaders/ShadersInclude/openpbrNormalMapFragment.js.map +1 -1
  63. package/Shaders/ShadersInclude/openpbrSubsurfaceLayerData.js +7 -3
  64. package/Shaders/ShadersInclude/openpbrSubsurfaceLayerData.js.map +1 -1
  65. package/Shaders/ShadersInclude/openpbrThinFilmLayerData.js +2 -2
  66. package/Shaders/ShadersInclude/openpbrThinFilmLayerData.js.map +1 -1
  67. package/Shaders/ShadersInclude/openpbrTransmissionLayerData.js +5 -5
  68. package/Shaders/ShadersInclude/openpbrTransmissionLayerData.js.map +1 -1
  69. package/Shaders/ShadersInclude/openpbrUboDeclaration.js +1 -1
  70. package/Shaders/ShadersInclude/openpbrUboDeclaration.js.map +1 -1
  71. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +1 -1
  72. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -1
  73. package/Shaders/ShadersInclude/pbrBlockFinalUnlitComponents.js +1 -1
  74. package/Shaders/ShadersInclude/pbrBlockFinalUnlitComponents.js.map +1 -1
  75. package/Shaders/ShadersInclude/pbrBlockLightmapInit.js +1 -1
  76. package/Shaders/ShadersInclude/pbrBlockLightmapInit.js.map +1 -1
  77. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js +3 -0
  78. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js.map +1 -1
  79. package/Shaders/ShadersInclude/pbrHelperFunctions.js +4 -0
  80. package/Shaders/ShadersInclude/pbrHelperFunctions.js.map +1 -1
  81. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  82. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  83. package/Shaders/ShadersInclude/pbrVertexDeclaration.js +1 -1
  84. package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
  85. package/Shaders/ShadersInclude/textureRepetitionFunctions.d.ts +5 -0
  86. package/Shaders/ShadersInclude/textureRepetitionFunctions.js +52 -0
  87. package/Shaders/ShadersInclude/textureRepetitionFunctions.js.map +1 -0
  88. package/Shaders/default.fragment.d.ts +1 -0
  89. package/Shaders/default.fragment.js +8 -6
  90. package/Shaders/default.fragment.js.map +1 -1
  91. package/Shaders/geometry.fragment.js +3 -3
  92. package/Shaders/geometry.fragment.js.map +1 -1
  93. package/Shaders/openpbr.fragment.d.ts +1 -0
  94. package/Shaders/openpbr.fragment.js +4 -2
  95. package/Shaders/openpbr.fragment.js.map +1 -1
  96. package/Shaders/pbr.fragment.d.ts +1 -0
  97. package/Shaders/pbr.fragment.js +24 -22
  98. package/Shaders/pbr.fragment.js.map +1 -1
  99. package/Shaders/textureProcessor.fragment.d.ts +5 -0
  100. package/Shaders/textureProcessor.fragment.js +156 -0
  101. package/Shaders/textureProcessor.fragment.js.map +1 -0
  102. package/ShadersWGSL/ShadersInclude/bumpFragment.js +3 -3
  103. package/ShadersWGSL/ShadersInclude/bumpFragment.js.map +1 -1
  104. package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js +5 -1
  105. package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
  106. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
  107. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  108. package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionData.js +1 -1
  109. package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionData.js.map +1 -1
  110. package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
  111. package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
  112. package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js +15 -15
  113. package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js.map +1 -1
  114. package/ShadersWGSL/ShadersInclude/openpbrCoatLayerData.js +7 -7
  115. package/ShadersWGSL/ShadersInclude/openpbrCoatLayerData.js.map +1 -1
  116. package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +1 -1
  117. package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -1
  118. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +1 -1
  119. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
  120. package/ShadersWGSL/ShadersInclude/openpbrFuzzLayerData.js +4 -4
  121. package/ShadersWGSL/ShadersInclude/openpbrFuzzLayerData.js.map +1 -1
  122. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +3 -3
  123. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
  124. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragment.js +4 -4
  125. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragment.js.map +1 -1
  126. package/ShadersWGSL/ShadersInclude/openpbrSubsurfaceLayerData.js +7 -3
  127. package/ShadersWGSL/ShadersInclude/openpbrSubsurfaceLayerData.js.map +1 -1
  128. package/ShadersWGSL/ShadersInclude/openpbrThinFilmLayerData.js +2 -2
  129. package/ShadersWGSL/ShadersInclude/openpbrThinFilmLayerData.js.map +1 -1
  130. package/ShadersWGSL/ShadersInclude/openpbrTransmissionLayerData.js +6 -6
  131. package/ShadersWGSL/ShadersInclude/openpbrTransmissionLayerData.js.map +1 -1
  132. package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js +1 -1
  133. package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js.map +1 -1
  134. package/ShadersWGSL/ShadersInclude/pbrBlockFinalUnlitComponents.js +1 -1
  135. package/ShadersWGSL/ShadersInclude/pbrBlockFinalUnlitComponents.js.map +1 -1
  136. package/ShadersWGSL/ShadersInclude/pbrBlockLightmapInit.js +1 -1
  137. package/ShadersWGSL/ShadersInclude/pbrBlockLightmapInit.js.map +1 -1
  138. package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js +4 -0
  139. package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js.map +1 -1
  140. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  141. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  142. package/ShadersWGSL/ShadersInclude/textureRepetitionFunctions.d.ts +5 -0
  143. package/ShadersWGSL/ShadersInclude/textureRepetitionFunctions.js +52 -0
  144. package/ShadersWGSL/ShadersInclude/textureRepetitionFunctions.js.map +1 -0
  145. package/ShadersWGSL/default.fragment.d.ts +1 -0
  146. package/ShadersWGSL/default.fragment.js +8 -6
  147. package/ShadersWGSL/default.fragment.js.map +1 -1
  148. package/ShadersWGSL/geometry.fragment.js +3 -3
  149. package/ShadersWGSL/geometry.fragment.js.map +1 -1
  150. package/ShadersWGSL/openpbr.fragment.d.ts +1 -0
  151. package/ShadersWGSL/openpbr.fragment.js +5 -3
  152. package/ShadersWGSL/openpbr.fragment.js.map +1 -1
  153. package/ShadersWGSL/openpbr.vertex.js +1 -1
  154. package/ShadersWGSL/openpbr.vertex.js.map +1 -1
  155. package/ShadersWGSL/pbr.fragment.d.ts +1 -0
  156. package/ShadersWGSL/pbr.fragment.js +24 -22
  157. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  158. package/ShadersWGSL/textureProcessor.fragment.d.ts +5 -0
  159. package/ShadersWGSL/textureProcessor.fragment.js +161 -0
  160. package/ShadersWGSL/textureProcessor.fragment.js.map +1 -0
  161. package/SmartAssets/index.d.ts +2 -0
  162. package/SmartAssets/index.js +2 -0
  163. package/SmartAssets/index.js.map +1 -0
  164. package/SmartAssets/smartAssetManager.d.ts +156 -0
  165. package/SmartAssets/smartAssetManager.js +531 -0
  166. package/SmartAssets/smartAssetManager.js.map +1 -0
  167. package/SmartAssets/smartAssetSerializer.d.ts +61 -0
  168. package/SmartAssets/smartAssetSerializer.js +97 -0
  169. package/SmartAssets/smartAssetSerializer.js.map +1 -0
  170. package/index.d.ts +1 -0
  171. package/index.js +1 -0
  172. package/index.js.map +1 -1
  173. package/package.json +1 -1
@@ -0,0 +1,315 @@
1
+ import { type Scene } from "../../scene.js";
2
+ import { type BaseTexture } from "./baseTexture.js";
3
+ import { type Nullable } from "../../types.js";
4
+ import { Color4 } from "../../Maths/math.color.js";
5
+ /**
6
+ * Specifies the color space of a texture operand.
7
+ * When `sRGB` is set the sampled RGB values are converted to linear space before any channel
8
+ * swizzle, factor multiplication, or arithmetic operation. Alpha is always treated as linear.
9
+ */
10
+ export declare enum TextureColorSpace {
11
+ /** Texture data is already in linear space (default). No conversion applied. */
12
+ Linear = 0,
13
+ /** Texture data is in sRGB (gamma) space. RGB channels are linearized (IEC 61966-2-1) before use. */
14
+ SRGB = 1
15
+ }
16
+ /**
17
+ * Bitmask controlling which channels are written to the output texture by a processing operation.
18
+ * Channels excluded from the mask receive a sensible default: `0.0` for RGB channels, `1.0` for alpha.
19
+ * Use `ChannelMask.RGBA` (or omit the parameter) to pass all channels through unchanged.
20
+ *
21
+ * | Flag | Channels written | Excluded channels |
22
+ * |------|-----------------|-------------------|
23
+ * | R | red | G=0, B=0, A=1 |
24
+ * | G | green | R=0, B=0, A=1 |
25
+ * | B | blue | R=0, G=0, A=1 |
26
+ * | A | alpha | R=0, G=0, B=0 |
27
+ * | RGB | red, green, blue | A=1 |
28
+ * | RGBA | all four | (none) |
29
+ */
30
+ export declare enum ChannelMask {
31
+ /** Pass only the red channel; G=0, B=0, A=1. */
32
+ R = 1,
33
+ /** Pass only the green channel; R=0, B=0, A=1. */
34
+ G = 2,
35
+ /** Pass only the blue channel; R=0, G=0, A=1. */
36
+ B = 4,
37
+ /** Pass only the alpha channel; R=0, G=0, B=0. */
38
+ A = 8,
39
+ /** Pass red, green, and blue; alpha is forced to 1.0. */
40
+ RGB = 7,
41
+ /** Pass all four channels unchanged (default — no masking). */
42
+ RGBA = 15
43
+ }
44
+ /**
45
+ * Specifies which channel of a texture to read for an operation.
46
+ * When a single channel is selected its scalar value is broadcast to RGB; alpha
47
+ * is either preserved from the original sample or replicated when `A` is chosen.
48
+ *
49
+ * | Value | Swizzle |
50
+ * |-------|---------|
51
+ * | RGBA | (r, g, b, a) — no swizzle (default) |
52
+ * | R | (r, r, r, a) |
53
+ * | G | (g, g, g, a) |
54
+ * | B | (b, b, b, a) |
55
+ * | A | (a, a, a, a) |
56
+ */
57
+ export declare enum TextureChannel {
58
+ /** Use all four channels as sampled (default). */
59
+ RGBA = 0,
60
+ /** Broadcast the red channel to RGB; preserve alpha: RRRA. */
61
+ R = 1,
62
+ /** Broadcast the green channel to RGB; preserve alpha: GGGA. */
63
+ G = 2,
64
+ /** Broadcast the blue channel to RGB; preserve alpha: BBBA. */
65
+ B = 3,
66
+ /** Broadcast the alpha channel to all four components: AAAA. */
67
+ A = 4
68
+ }
69
+ /**
70
+ * Represents an operand for a texture processing operation, or the result of one.
71
+ *
72
+ * As an operand, the value evaluates to a vec4 per texel:
73
+ * - `texture` only → `sample(texture)`
74
+ * - `factor` only → `factor` (constant)
75
+ * - both → `sample(texture) * factor`
76
+ *
77
+ * As a result returned by a processing function:
78
+ * - `texture` holds the GPU-processed output; `dispose()` releases it when no longer needed.
79
+ * - `factor` holds a CPU-folded constant when all inputs were texture-free; no `dispose` is set.
80
+ *
81
+ * Results are directly usable as operands to subsequent operations. When a result with a
82
+ * `dispose` function is passed as an operand, the next operation automatically calls `dispose`
83
+ * after consuming it, so intermediate textures are cleaned up without manual tracking.
84
+ *
85
+ * At least one of `texture` or `factor` must be provided when used as an operand.
86
+ */
87
+ export interface ITextureProcessOperand {
88
+ /**
89
+ * Texture to sample. When combined with `factor`, the sampled value is multiplied
90
+ * component-wise by the factor. Null when the operand or result is a constant.
91
+ */
92
+ texture: Nullable<BaseTexture>;
93
+ /**
94
+ * Optional constant RGBA factor. If `texture` is also set, the sampled value is
95
+ * multiplied by this factor. If `texture` is not set, this becomes the constant output.
96
+ * When omitted and `texture` is set, defaults to (1, 1, 1, 1) — no scaling.
97
+ */
98
+ factor?: Color4;
99
+ /**
100
+ * Optional channel selection applied to the sampled texture value before any factor
101
+ * multiplication. When omitted or set to `TextureChannel.RGBA`, the sample is used
102
+ * as-is. When set to a single channel, that channel's scalar is broadcast to RGB
103
+ * (or all four components for `TextureChannel.A`). Only meaningful when `texture` is set.
104
+ */
105
+ channel?: TextureChannel;
106
+ /**
107
+ * Color space of the texture data. When set to `TextureColorSpace.SRGB`, the sampled
108
+ * RGB channels are converted from sRGB to linear space (IEC 61966-2-1) before the channel
109
+ * swizzle, factor multiplication, and any arithmetic operation. Alpha is always linear.
110
+ * Defaults to `TextureColorSpace.Linear` (no conversion). Only meaningful when `texture` is set.
111
+ */
112
+ colorSpace?: TextureColorSpace;
113
+ /**
114
+ * Disposes the texture produced by a processing operation. Only present on results
115
+ * returned by the texture processing functions. When a result is passed as an operand
116
+ * to the next operation in a chain, its `dispose` is called automatically after the
117
+ * GPU pass completes. Call `dispose` explicitly on the final result when the texture
118
+ * is no longer needed (or skip it if transferring ownership to a material).
119
+ */
120
+ dispose?: () => void;
121
+ }
122
+ /**
123
+ * Create an operand from a texture alone (no constant factor scaling).
124
+ * @param texture - The texture to sample, or null to produce an identity (1,1,1,1) constant operand
125
+ * @param channel - Optional channel selection. When set, the sampled value is swizzled before use
126
+ * (e.g. `TextureChannel.R` → RRRA). Defaults to `TextureChannel.RGBA` (no swizzle).
127
+ * @param colorSpace - Optional color space. When `TextureColorSpace.SRGB`, the sampled RGB channels
128
+ * are linearized before use. Defaults to `TextureColorSpace.Linear`.
129
+ * @returns An operand that evaluates to the sampled texture value
130
+ */
131
+ export declare function CreateTextureOperand(texture: Nullable<BaseTexture>, channel?: TextureChannel, colorSpace?: TextureColorSpace): ITextureProcessOperand;
132
+ /**
133
+ * Create an operand from a constant RGBA factor with no texture.
134
+ * @param factor - The constant RGBA value
135
+ * @returns An operand that evaluates to the constant factor
136
+ */
137
+ export declare function CreateFactorOperand(factor: Color4): ITextureProcessOperand;
138
+ /**
139
+ * Create an operand from a texture multiplied by a constant RGBA factor.
140
+ * This is the standard glTF pattern (e.g. baseColorTexture * baseColorFactor).
141
+ * If `texture` is null, returns a factor-only operand.
142
+ * @param texture - The texture to sample, or null to use the factor alone
143
+ * @param factor - The constant factor to multiply by
144
+ * @param channel - Optional channel selection. When set, the sampled value is swizzled before
145
+ * factor multiplication (e.g. `TextureChannel.G` → GGGA, then multiplied by factor).
146
+ * Defaults to `TextureChannel.RGBA` (no swizzle).
147
+ * @param colorSpace - Optional color space. When `TextureColorSpace.SRGB`, the sampled RGB channels
148
+ * are linearized before factor multiplication. Defaults to `TextureColorSpace.Linear`.
149
+ * @returns An operand that evaluates to `sample(texture) * factor`, or `factor` if texture is null
150
+ */
151
+ export declare function CreateTextureWithFactorOperand(texture: Nullable<BaseTexture>, factor: Color4, channel?: TextureChannel, colorSpace?: TextureColorSpace): ITextureProcessOperand;
152
+ /**
153
+ * Multiply two texture operands together, component-wise: `result = a * b`.
154
+ *
155
+ * Each operand can be a texture, a constant factor, or a texture scaled by a factor.
156
+ * This is useful for applying glTF-style factors to textures (e.g. `baseColorTexture * baseColorFactor`),
157
+ * or for modulating one texture by another.
158
+ *
159
+ * If both operands are constant (no textures), the multiplication is performed on the CPU and
160
+ * the result is returned as a factor-only operand with no texture allocated.
161
+ *
162
+ * When operands are results of previous operations (i.e. they carry a `dispose` function),
163
+ * their intermediate textures are automatically released after the GPU pass completes.
164
+ *
165
+ * @param name - Name for the resulting procedural texture (used only when a GPU pass is needed)
166
+ * @param a - First operand
167
+ * @param b - Second operand
168
+ * @param scene - Scene to create the texture in (used only when a GPU pass is needed)
169
+ * @param outputColorSpace - Optional output color space. When `TextureColorSpace.SRGB`, the linear
170
+ * result is converted to sRGB (IEC 61966-2-1) before being written. Defaults to `TextureColorSpace.Linear`.
171
+ * @param outputChannelMask - Optional bitmask of channels to write. Excluded color channels are set to
172
+ * `0.0`; excluded alpha is set to `1.0`. Defaults to `ChannelMask.RGBA` (all channels written).
173
+ * @returns An operand whose `texture` holds the GPU result, or whose `factor` holds the CPU-folded constant
174
+ */
175
+ export declare function MultiplyTexturesAsync(name: string, a: ITextureProcessOperand, b: ITextureProcessOperand, scene: Scene, outputColorSpace?: TextureColorSpace, outputChannelMask?: ChannelMask): Promise<ITextureProcessOperand>;
176
+ /**
177
+ * Take the component-wise maximum of two texture operands: `result = max(a, b)`.
178
+ *
179
+ * Each operand can be a texture, a constant factor, or a texture scaled by a factor.
180
+ * Useful for operations such as combining ambient occlusion maps or taking the
181
+ * brightest contribution from two sources.
182
+ *
183
+ * If both operands are constant (no textures), the operation is performed on the CPU and
184
+ * the result is returned as a factor-only operand with no texture allocated.
185
+ *
186
+ * When operands are results of previous operations (i.e. they carry a `dispose` function),
187
+ * their intermediate textures are automatically released after the GPU pass completes.
188
+ *
189
+ * @param name - Name for the resulting procedural texture (used only when a GPU pass is needed)
190
+ * @param a - First operand
191
+ * @param b - Second operand
192
+ * @param scene - Scene to create the texture in (used only when a GPU pass is needed)
193
+ * @param outputColorSpace - Optional output color space. When `TextureColorSpace.SRGB`, the linear
194
+ * result is converted to sRGB (IEC 61966-2-1) before being written. Defaults to `TextureColorSpace.Linear`.
195
+ * @param outputChannelMask - Optional bitmask of channels to write. Excluded color channels are set to
196
+ * `0.0`; excluded alpha is set to `1.0`. Defaults to `ChannelMask.RGBA` (all channels written).
197
+ * @returns An operand whose `texture` holds the GPU result, or whose `factor` holds the CPU-folded constant
198
+ */
199
+ export declare function MaxTexturesAsync(name: string, a: ITextureProcessOperand, b: ITextureProcessOperand, scene: Scene, outputColorSpace?: TextureColorSpace, outputChannelMask?: ChannelMask): Promise<ITextureProcessOperand>;
200
+ /**
201
+ * Linearly interpolate between two texture operands: `result = mix(a, b, t)`.
202
+ *
203
+ * Each operand can be a texture, a constant factor, or a texture scaled by a factor.
204
+ * The `t` operand controls the blend weight per texel, per channel — a value of 0 returns `a`,
205
+ * a value of 1 returns `b`. Use a grayscale texture or a scalar `Color4(v, v, v, v)` for
206
+ * uniform blending across all channels.
207
+ *
208
+ * If all three operands are constant (no textures), the interpolation is performed on the CPU and
209
+ * the result is returned as a factor-only operand with no texture allocated.
210
+ *
211
+ * When operands are results of previous operations (i.e. they carry a `dispose` function),
212
+ * their intermediate textures are automatically released after the GPU pass completes.
213
+ *
214
+ * @param name - Name for the resulting procedural texture (used only when a GPU pass is needed)
215
+ * @param a - Start value operand (returned when t = 0)
216
+ * @param b - End value operand (returned when t = 1)
217
+ * @param t - Blend weight operand. Each channel independently controls the blend for the corresponding output channel.
218
+ * @param scene - Scene to create the texture in (used only when a GPU pass is needed)
219
+ * @param outputColorSpace - Optional output color space. When `TextureColorSpace.SRGB`, the linear
220
+ * result is converted to sRGB (IEC 61966-2-1) before being written. Defaults to `TextureColorSpace.Linear`.
221
+ * @param outputChannelMask - Optional bitmask of channels to write. Excluded color channels are set to
222
+ * `0.0`; excluded alpha is set to `1.0`. Defaults to `ChannelMask.RGBA` (all channels written).
223
+ * @returns An operand whose `texture` holds the GPU result, or whose `factor` holds the CPU-folded constant
224
+ */
225
+ export declare function LerpTexturesAsync(name: string, a: ITextureProcessOperand, b: ITextureProcessOperand, t: ITextureProcessOperand, scene: Scene, outputColorSpace?: TextureColorSpace, outputChannelMask?: ChannelMask): Promise<ITextureProcessOperand>;
226
+ /**
227
+ * Invert selected channels of a texture operand: `result[ch] = 1 - input[ch]`.
228
+ *
229
+ * The `channels` bitmask selects which channels are inverted; unselected channels pass through
230
+ * unchanged. Use `ChannelMask.RGB` for the common roughness↔smoothness conversion, or
231
+ * `ChannelMask.RGBA` (the default) to invert the entire texture.
232
+ *
233
+ * This is a unary operation — only operand A is used. Any `colorSpace` or `channel` properties
234
+ * on the input operand are honoured (sRGB linearization and channel swizzle applied before
235
+ * the invert).
236
+ *
237
+ * If the input is constant (no texture), the invert is performed on the CPU.
238
+ *
239
+ * When the input is the result of a previous operation (i.e. it carries a `dispose` function),
240
+ * its intermediate texture is automatically released after the GPU pass completes.
241
+ *
242
+ * @param name - Name for the resulting procedural texture (used only when a GPU pass is needed)
243
+ * @param input - Operand to invert
244
+ * @param scene - Scene to create the texture in (used only when a GPU pass is needed)
245
+ * @param channels - Bitmask of channels to invert. Defaults to `ChannelMask.RGBA`.
246
+ * @param outputColorSpace - Optional output color space. When `TextureColorSpace.SRGB`, the linear
247
+ * result is converted to sRGB (IEC 61966-2-1) before being written. Defaults to `TextureColorSpace.Linear`.
248
+ * @param outputChannelMask - Optional bitmask of channels to write. Excluded color channels are set to
249
+ * `0.0`; excluded alpha is set to `1.0`. Defaults to `ChannelMask.RGBA` (all channels written).
250
+ * @returns An operand whose `texture` holds the GPU result, or whose `factor` holds the CPU-folded constant
251
+ */
252
+ export declare function InvertTextureAsync(name: string, input: ITextureProcessOperand, scene: Scene, channels?: ChannelMask, outputColorSpace?: TextureColorSpace, outputChannelMask?: ChannelMask): Promise<ITextureProcessOperand>;
253
+ /**
254
+ * Extract the per-texel maximum channel value from a texture and broadcast it to all output
255
+ * channels, producing a single-value (greyscale) texture in a single GPU pass.
256
+ *
257
+ * For each texel, computes `max(r, g, b)` — or `max(r, g, b, a)` when `includeAlpha` is true —
258
+ * and writes that scalar to the output:
259
+ * - `includeAlpha = false` (default): output is `(m, m, m, a)` where `m = max(r, g, b)`
260
+ * - `includeAlpha = true`: output is `(m, m, m, m)` where `m = max(r, g, b, a)`
261
+ *
262
+ * This is more efficient than chaining `ExtractChannelAsync` calls through `MaxTexturesAsync`,
263
+ * which would require multiple intermediate textures and GPU passes.
264
+ *
265
+ * Any `colorSpace` or `channel` properties on the input operand are honoured (sRGB linearization
266
+ * and channel swizzle applied before the max reduction).
267
+ *
268
+ * If the input is constant (no texture), the reduction is performed on the CPU.
269
+ *
270
+ * When the input is the result of a previous operation (i.e. it carries a `dispose` function),
271
+ * its intermediate texture is automatically released after the GPU pass completes.
272
+ *
273
+ * @param name - Name for the resulting procedural texture (used only when a GPU pass is needed)
274
+ * @param input - Operand to reduce
275
+ * @param scene - Scene to create the texture in (used only when a GPU pass is needed)
276
+ * @param includeAlpha - When true, alpha participates in the max and is also set to the result.
277
+ * Defaults to false (alpha is preserved from the input).
278
+ * @param outputColorSpace - Optional output color space. When `TextureColorSpace.SRGB`, the linear
279
+ * result is converted to sRGB (IEC 61966-2-1) before being written. Defaults to `TextureColorSpace.Linear`.
280
+ * @param outputChannelMask - Optional bitmask of channels to write. Excluded color channels are set to
281
+ * `0.0`; excluded alpha is set to `1.0`. Defaults to `ChannelMask.RGBA` (all channels written).
282
+ * @returns An operand whose `texture` holds the GPU result, or whose `factor` holds the CPU-folded constant
283
+ */
284
+ export declare function ExtractMaxChannelAsync(name: string, input: ITextureProcessOperand, scene: Scene, includeAlpha?: boolean, outputColorSpace?: TextureColorSpace, outputChannelMask?: ChannelMask): Promise<ITextureProcessOperand>;
285
+ /**
286
+ * Extract a single channel from a texture and broadcast it to RGB (or all four components for
287
+ * `TextureChannel.A`), producing a new texture. This is a convenience wrapper over
288
+ * `MultiplyTexturesAsync` with a `(1,1,1,1)` factor and the requested channel swizzle applied
289
+ * to the input.
290
+ *
291
+ * Swizzle results per channel:
292
+ * - `TextureChannel.R` → (r, r, r, a)
293
+ * - `TextureChannel.G` → (g, g, g, a)
294
+ * - `TextureChannel.B` → (b, b, b, a)
295
+ * - `TextureChannel.A` → (a, a, a, a)
296
+ *
297
+ * If the input is constant (no texture), the swizzle is applied on the CPU.
298
+ *
299
+ * Any `colorSpace` property on the input operand is honoured (sRGB linearization applied before
300
+ * the swizzle). Any existing `channel` on the input is replaced by the `channel` argument.
301
+ *
302
+ * When the input is the result of a previous operation (i.e. it carries a `dispose` function),
303
+ * its intermediate texture is automatically released after the GPU pass completes.
304
+ *
305
+ * @param name - Name for the resulting procedural texture (used only when a GPU pass is needed)
306
+ * @param input - Operand to extract the channel from
307
+ * @param channel - The channel to extract and broadcast
308
+ * @param scene - Scene to create the texture in (used only when a GPU pass is needed)
309
+ * @param outputColorSpace - Optional output color space. When `TextureColorSpace.SRGB`, the linear
310
+ * result is converted to sRGB (IEC 61966-2-1) before being written. Defaults to `TextureColorSpace.Linear`.
311
+ * @param outputChannelMask - Optional bitmask of channels to write. Excluded color channels are set to
312
+ * `0.0`; excluded alpha is set to `1.0`. Defaults to `ChannelMask.RGBA` (all channels written).
313
+ * @returns An operand whose `texture` holds the GPU result, or whose `factor` holds the CPU-folded constant
314
+ */
315
+ export declare function ExtractChannelAsync(name: string, input: ITextureProcessOperand, channel: TextureChannel, scene: Scene, outputColorSpace?: TextureColorSpace, outputChannelMask?: ChannelMask): Promise<ITextureProcessOperand>;