@aura3d/engine 4.2.0 → 4.3.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.
Files changed (191) hide show
  1. package/README.md +1 -1
  2. package/dist/aura3d-cli/cli-help.d.ts.map +1 -1
  3. package/dist/aura3d-cli/cli-help.js +4 -2
  4. package/dist/aura3d-cli/cli-help.js.map +1 -1
  5. package/dist/aura3d-cli/cli.js +85 -2
  6. package/dist/aura3d-cli/cli.js.map +1 -1
  7. package/dist/aura3d-cli/commands/assets/index.js +2 -2
  8. package/dist/aura3d-cli/commands/assets/index.js.map +1 -1
  9. package/dist/aura3d-cli/commands/meshyLedger.d.ts +125 -14
  10. package/dist/aura3d-cli/commands/meshyLedger.d.ts.map +1 -1
  11. package/dist/aura3d-cli/commands/meshyLedger.js +262 -35
  12. package/dist/aura3d-cli/commands/meshyLedger.js.map +1 -1
  13. package/dist/aura3d-cli/commands/prd13/run.js +19 -16
  14. package/dist/aura3d-cli/commands/prd13/run.js.map +1 -1
  15. package/dist/aura3d-cli/index.d.ts +10 -0
  16. package/dist/aura3d-cli/index.d.ts.map +1 -1
  17. package/dist/aura3d-cli/index.js +13 -0
  18. package/dist/aura3d-cli/index.js.map +1 -1
  19. package/dist/aura3d-cli/skin/analysis.d.ts +137 -0
  20. package/dist/aura3d-cli/skin/analysis.d.ts.map +1 -0
  21. package/dist/aura3d-cli/skin/analysis.js +382 -0
  22. package/dist/aura3d-cli/skin/analysis.js.map +1 -0
  23. package/dist/aura3d-cli/skin/command.d.ts +75 -0
  24. package/dist/aura3d-cli/skin/command.d.ts.map +1 -0
  25. package/dist/aura3d-cli/skin/command.js +208 -0
  26. package/dist/aura3d-cli/skin/command.js.map +1 -0
  27. package/dist/aura3d-cli/skin/glbEdit.d.ts +14 -0
  28. package/dist/aura3d-cli/skin/glbEdit.d.ts.map +1 -0
  29. package/dist/aura3d-cli/skin/glbEdit.js +152 -0
  30. package/dist/aura3d-cli/skin/glbEdit.js.map +1 -0
  31. package/dist/aura3d-cli/skin/gltf.d.ts +159 -0
  32. package/dist/aura3d-cli/skin/gltf.d.ts.map +1 -0
  33. package/dist/aura3d-cli/skin/gltf.js +379 -0
  34. package/dist/aura3d-cli/skin/gltf.js.map +1 -0
  35. package/dist/aura3d-cli/skin/rebuildLimbs.d.ts +31 -0
  36. package/dist/aura3d-cli/skin/rebuildLimbs.d.ts.map +1 -0
  37. package/dist/aura3d-cli/skin/rebuildLimbs.js +326 -0
  38. package/dist/aura3d-cli/skin/rebuildLimbs.js.map +1 -0
  39. package/dist/aura3d-cli/skin/refitSkeleton.d.ts +23 -0
  40. package/dist/aura3d-cli/skin/refitSkeleton.d.ts.map +1 -0
  41. package/dist/aura3d-cli/skin/refitSkeleton.js +288 -0
  42. package/dist/aura3d-cli/skin/refitSkeleton.js.map +1 -0
  43. package/dist/aura3d-cli/skin/repair.d.ts +45 -0
  44. package/dist/aura3d-cli/skin/repair.d.ts.map +1 -0
  45. package/dist/aura3d-cli/skin/repair.js +192 -0
  46. package/dist/aura3d-cli/skin/repair.js.map +1 -0
  47. package/dist/create-aura3d/index.js +1 -1
  48. package/dist/engine/agent-api/camera/layers.d.ts.map +1 -1
  49. package/dist/engine/agent-api/camera/layers.js +6 -1
  50. package/dist/engine/agent-api/camera/layers.js.map +1 -1
  51. package/dist/engine/agent-api/compiler/customMaterial.d.ts.map +1 -1
  52. package/dist/engine/agent-api/compiler/customMaterial.js +12 -1
  53. package/dist/engine/agent-api/compiler/customMaterial.js.map +1 -1
  54. package/dist/engine/agent-api/compiler/lines.d.ts.map +1 -1
  55. package/dist/engine/agent-api/compiler/lines.js +8 -6
  56. package/dist/engine/agent-api/compiler/lines.js.map +1 -1
  57. package/dist/engine/agent-api/nodes/types.d.ts +6 -0
  58. package/dist/engine/agent-api/nodes/types.d.ts.map +1 -1
  59. package/dist/engine/agent-api/vfx/effects-api.d.ts.map +1 -1
  60. package/dist/engine/agent-api/vfx/effects-api.js +12 -3
  61. package/dist/engine/agent-api/vfx/effects-api.js.map +1 -1
  62. package/dist/engine/agent-api/vfx/gameEffects.d.ts.map +1 -1
  63. package/dist/engine/agent-api/vfx/gameEffects.js +20 -3
  64. package/dist/engine/agent-api/vfx/gameEffects.js.map +1 -1
  65. package/dist/engine/contracts/camera.d.ts +1 -0
  66. package/dist/engine/contracts/camera.d.ts.map +1 -1
  67. package/dist/engine/contracts/effects.d.ts +4 -2
  68. package/dist/engine/contracts/effects.d.ts.map +1 -1
  69. package/dist/engine/contracts/effects.js.map +1 -1
  70. package/dist/game/index.d.ts +2 -2
  71. package/dist/game/index.d.ts.map +1 -1
  72. package/dist/game/index.js +1 -1
  73. package/dist/game/index.js.map +1 -1
  74. package/dist/game/motion/facing.d.ts +30 -0
  75. package/dist/game/motion/facing.d.ts.map +1 -0
  76. package/dist/game/motion/facing.js +50 -0
  77. package/dist/game/motion/facing.js.map +1 -0
  78. package/dist/game/motion/handBounce.d.ts +251 -0
  79. package/dist/game/motion/handBounce.d.ts.map +1 -0
  80. package/dist/game/motion/handBounce.js +315 -0
  81. package/dist/game/motion/handBounce.js.map +1 -0
  82. package/dist/game/motion/index.d.ts +6 -0
  83. package/dist/game/motion/index.d.ts.map +1 -1
  84. package/dist/game/motion/index.js +3 -0
  85. package/dist/game/motion/index.js.map +1 -1
  86. package/dist/game/motion/twoHandGrip.d.ts +229 -0
  87. package/dist/game/motion/twoHandGrip.d.ts.map +1 -0
  88. package/dist/game/motion/twoHandGrip.js +413 -0
  89. package/dist/game/motion/twoHandGrip.js.map +1 -0
  90. package/dist/game/session/warmPrograms.d.ts +17 -0
  91. package/dist/game/session/warmPrograms.d.ts.map +1 -1
  92. package/dist/game/session/warmPrograms.js +18 -1
  93. package/dist/game/session/warmPrograms.js.map +1 -1
  94. package/dist/physics/ensure.d.ts +2 -0
  95. package/dist/physics/ensure.d.ts.map +1 -0
  96. package/dist/physics/ensure.js +4 -0
  97. package/dist/physics/ensure.js.map +1 -0
  98. package/dist/physics/index.d.ts +1 -0
  99. package/dist/physics/index.d.ts.map +1 -1
  100. package/dist/physics/index.js +1 -0
  101. package/dist/physics/index.js.map +1 -1
  102. package/dist/physics/world.d.ts +1 -0
  103. package/dist/physics/world.d.ts.map +1 -1
  104. package/dist/physics/world.js +1 -0
  105. package/dist/physics/world.js.map +1 -1
  106. package/dist/physics-rapier/index.d.ts +2 -0
  107. package/dist/physics-rapier/index.d.ts.map +1 -1
  108. package/dist/physics-rapier/index.js +12 -10
  109. package/dist/physics-rapier/index.js.map +1 -1
  110. package/dist/physics-rapier/rapierInit.d.ts +6 -0
  111. package/dist/physics-rapier/rapierInit.d.ts.map +1 -0
  112. package/dist/physics-rapier/rapierInit.js +12 -0
  113. package/dist/physics-rapier/rapierInit.js.map +1 -0
  114. package/dist/physics-rapier/rapierInit.lazy.d.ts +6 -0
  115. package/dist/physics-rapier/rapierInit.lazy.d.ts.map +1 -0
  116. package/dist/physics-rapier/rapierInit.lazy.js +19 -0
  117. package/dist/physics-rapier/rapierInit.lazy.js.map +1 -0
  118. package/dist/rendering/DepthPass.d.ts.map +1 -1
  119. package/dist/rendering/DepthPass.js +30 -8
  120. package/dist/rendering/DepthPass.js.map +1 -1
  121. package/dist/rendering/ForwardPass.d.ts.map +1 -1
  122. package/dist/rendering/ForwardPass.js +7 -0
  123. package/dist/rendering/ForwardPass.js.map +1 -1
  124. package/dist/rendering/Renderer.d.ts +0 -2
  125. package/dist/rendering/Renderer.d.ts.map +1 -1
  126. package/dist/rendering/Renderer.js +6 -16
  127. package/dist/rendering/Renderer.js.map +1 -1
  128. package/dist/rendering/contracts/output.d.ts +9 -1
  129. package/dist/rendering/contracts/output.d.ts.map +1 -1
  130. package/dist/rendering/contracts/output.js.map +1 -1
  131. package/dist/rendering/output/OutputPass.d.ts +2 -0
  132. package/dist/rendering/output/OutputPass.d.ts.map +1 -1
  133. package/dist/rendering/output/OutputPass.js +26 -3
  134. package/dist/rendering/output/OutputPass.js.map +1 -1
  135. package/dist/rendering/output/ToneMappingOperators.glsl.d.ts +3 -1
  136. package/dist/rendering/output/ToneMappingOperators.glsl.d.ts.map +1 -1
  137. package/dist/rendering/output/ToneMappingOperators.glsl.js +19 -1
  138. package/dist/rendering/output/ToneMappingOperators.glsl.js.map +1 -1
  139. package/dist/rendering/post/v2Stages.d.ts +2 -7
  140. package/dist/rendering/post/v2Stages.d.ts.map +1 -1
  141. package/dist/rendering/post/v2Stages.js +2 -17
  142. package/dist/rendering/post/v2Stages.js.map +1 -1
  143. package/dist/rendering/post/vignetteColor.d.ts +8 -0
  144. package/dist/rendering/post/vignetteColor.d.ts.map +1 -0
  145. package/dist/rendering/post/vignetteColor.js +18 -0
  146. package/dist/rendering/post/vignetteColor.js.map +1 -0
  147. package/dist/rendering/renderer/PostprocessExecution.d.ts +10 -0
  148. package/dist/rendering/renderer/PostprocessExecution.d.ts.map +1 -1
  149. package/dist/rendering/renderer/PostprocessExecution.js +38 -38
  150. package/dist/rendering/renderer/PostprocessExecution.js.map +1 -1
  151. package/dist/rendering/renderer/coreOutputPostRoute.d.ts +25 -17
  152. package/dist/rendering/renderer/coreOutputPostRoute.d.ts.map +1 -1
  153. package/dist/rendering/renderer/coreOutputPostRoute.js +27 -18
  154. package/dist/rendering/renderer/coreOutputPostRoute.js.map +1 -1
  155. package/dist/rendering/renderer/qrSubFlags.d.ts +1 -1
  156. package/dist/rendering/renderer/qrSubFlags.d.ts.map +1 -1
  157. package/dist/rendering/renderer/qrSubFlags.js +2 -8
  158. package/dist/rendering/renderer/qrSubFlags.js.map +1 -1
  159. package/dist/rendering/shaders/chunks/author/index.d.ts.map +1 -1
  160. package/dist/rendering/shaders/chunks/author/index.js +7 -0
  161. package/dist/rendering/shaders/chunks/author/index.js.map +1 -1
  162. package/dist/rendering/shaders/chunks/author/shadow.glsl.d.ts +11 -0
  163. package/dist/rendering/shaders/chunks/author/shadow.glsl.d.ts.map +1 -0
  164. package/dist/rendering/shaders/chunks/author/shadow.glsl.js +57 -0
  165. package/dist/rendering/shaders/chunks/author/shadow.glsl.js.map +1 -0
  166. package/dist/rendering/shadows/DirectionalCascadeFitter.d.ts +20 -0
  167. package/dist/rendering/shadows/DirectionalCascadeFitter.d.ts.map +1 -1
  168. package/dist/rendering/shadows/DirectionalCascadeFitter.js +80 -7
  169. package/dist/rendering/shadows/DirectionalCascadeFitter.js.map +1 -1
  170. package/dist/rendering/shadows/Prd02DepthShaderLibrary.d.ts.map +1 -1
  171. package/dist/rendering/shadows/Prd02DepthShaderLibrary.js +9 -1
  172. package/dist/rendering/shadows/Prd02DepthShaderLibrary.js.map +1 -1
  173. package/dist/rendering/shadows/ShadowSystem.d.ts.map +1 -1
  174. package/dist/rendering/shadows/ShadowSystem.js +7 -2
  175. package/dist/rendering/shadows/ShadowSystem.js.map +1 -1
  176. package/dist/rendering/webgl2/LdrPostprocessShader.d.ts +2 -0
  177. package/dist/rendering/webgl2/LdrPostprocessShader.d.ts.map +1 -1
  178. package/dist/rendering/webgl2/LdrPostprocessShader.js +25 -3
  179. package/dist/rendering/webgl2/LdrPostprocessShader.js.map +1 -1
  180. package/dist/rendering/webgl2/LegacyPost.d.ts +11 -2
  181. package/dist/rendering/webgl2/LegacyPost.d.ts.map +1 -1
  182. package/dist/rendering/webgl2/LegacyPost.js +191 -16
  183. package/dist/rendering/webgl2/LegacyPost.js.map +1 -1
  184. package/package.json +33 -26
  185. package/templates/cinematic-scene/package.json +2 -2
  186. package/templates/mini-game/package.json +2 -2
  187. package/templates/product-viewer/package.json +2 -2
  188. package/templates/production-asset-inspector/package.json +1 -1
  189. package/templates/production-material-studio/package.json +1 -1
  190. package/templates/production-product-configurator/package.json +1 -1
  191. package/templates/production-product-viewer/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"LdrPostprocessShader.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgl2/LdrPostprocessShader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,iHAAiH;IACjH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAGhE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAyNpE"}
1
+ {"version":3,"file":"LdrPostprocessShader.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgl2/LdrPostprocessShader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,iHAAiH;IACjH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,iIAAiI;IACjI,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAIhE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CA8OpE"}
@@ -10,7 +10,8 @@
10
10
  */
11
11
  export function ldrVariantKey(variant) {
12
12
  const op = variant.toneMapping ? Math.min(6, Math.max(0, Math.floor(variant.operator))) : 0;
13
- return [variant.toneMapping ? 1 : 0, op, variant.inputSrgb ? 1 : 0, variant.outputSrgb ? 1 : 0, variant.grade ? 1 : 0, variant.grade && variant.sharpening ? 1 : 0, variant.fxaa ? 1 : 0].join("");
13
+ const base = [variant.toneMapping ? 1 : 0, op, variant.inputSrgb ? 1 : 0, variant.outputSrgb ? 1 : 0, variant.grade ? 1 : 0, variant.grade && variant.sharpening ? 1 : 0, variant.fxaa ? 1 : 0].join("");
14
+ return variant.toneMapping && variant.vignette ? `${base}v` : base;
14
15
  }
15
16
  export function ldrFragmentSource(variant) {
16
17
  const op = variant.toneMapping ? Math.min(6, Math.max(0, Math.floor(variant.operator))) : 0;
@@ -23,6 +24,7 @@ precision highp float;
23
24
  #define LDR_GRADE ${variant.grade ? 1 : 0}
24
25
  #define LDR_SHARPEN ${variant.grade && variant.sharpening ? 1 : 0}
25
26
  #define LDR_FXAA ${variant.fxaa ? 1 : 0}
27
+ #define LDR_VIGNETTE ${variant.toneMapping && variant.vignette ? 1 : 0}
26
28
  uniform sampler2D u_source;
27
29
  uniform vec2 u_texelSize;
28
30
  uniform int u_hasToneMapping;
@@ -43,6 +45,12 @@ uniform float u_sharpening;
43
45
  uniform int u_hasFxaa;
44
46
  uniform float u_edgeThreshold;
45
47
  uniform float u_subpixelBlend;
48
+ #if LDR_VIGNETTE
49
+ uniform float u_vignetteIntensity;
50
+ uniform float u_vignetteSmoothness;
51
+ uniform float u_vignetteRoundness;
52
+ uniform vec3 u_vignetteColor;
53
+ #endif
46
54
  in vec2 v_uv;
47
55
  out vec4 outColor;
48
56
 
@@ -147,9 +155,23 @@ float toneMapChannel(float value) {
147
155
  }
148
156
  #endif
149
157
 
150
- vec3 applyToneMapping(vec3 color) {
158
+ #if LDR_VIGNETTE
159
+ // PostGraph v2: the vignette is a light falloff, so it multiplies the linear colour before the tone operator
160
+ // (tone map and encode run once, after every effect). Same radial law as the display-grade vignette.
161
+ vec3 vignetteLinear(vec3 color, vec2 uv) {
162
+ vec2 p = (uv - 0.5) * 2.0;
163
+ p.x *= (u_texelSize.y / u_texelSize.x) * u_vignetteRoundness;
164
+ float len = length(p) * u_vignetteIntensity;
165
+ return color * mix(vec3(1.0), u_vignetteColor, pow(clamp(len, 0.0, 1.0), u_vignetteSmoothness));
166
+ }
167
+ #endif
168
+
169
+ vec3 applyToneMapping(vec3 color, vec2 uv) {
151
170
  #if LDR_TONE
152
171
  vec3 decoded = decodeColor(color);
172
+ #if LDR_VIGNETTE
173
+ decoded = vignetteLinear(decoded, uv);
174
+ #endif
153
175
  #if LDR_OP == 2
154
176
  vec3 mapped = acesFilmic(max(vec3(0.0), decoded * u_exposure) / max(0.0001, u_whitePoint));
155
177
  #else
@@ -184,7 +206,7 @@ vec3 applyColorGrade(vec3 color, vec2 uv) {
184
206
  vec3 baseColorAt(vec2 uv) {
185
207
  vec2 clampedUv = clamp(uv, vec2(0.0), vec2(1.0));
186
208
  vec3 color = texture(u_source, clampedUv).rgb;
187
- return applyColorGrade(applyToneMapping(color), clampedUv);
209
+ return applyColorGrade(applyToneMapping(color, clampedUv), clampedUv);
188
210
  }
189
211
 
190
212
  vec3 finalColorAt(vec2 uv) {
@@ -1 +1 @@
1
- {"version":3,"file":"LdrPostprocessShader.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgl2/LdrPostprocessShader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAcH,MAAM,UAAU,aAAa,CAAC,OAA0B;IACtD,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5F,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAA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AC"}
@@ -163,6 +163,13 @@ export declare class WebGL2LegacyPostPipeline {
163
163
  intensity: number;
164
164
  }): void;
165
165
  presentLdrPostprocess(source: RenderTarget, options: WebGL2LdrPostprocessPresentationOptions): void;
166
+ /**
167
+ * PostGraph v2 bloom stage: runs the native HDR bloom over `source` and writes the
168
+ * composite (source + bloom) into the rgba16f `destination`, so the single tone map
169
+ * and encode run afterwards in the OutputPass. The same passes `presentLdrPostprocess`
170
+ * runs for a bloom descriptor, minus the fused tone/grade/FXAA stage.
171
+ */
172
+ presentHdrBloom(source: RenderTarget, bloomOptionsRaw: Readonly<Record<string, unknown>>, destination: RenderTarget): void;
166
173
  drawRenderTargetToBackbuffer(source: WebGL2RenderTarget, outputWidth: number, outputHeight: number): void;
167
174
  ensureBloomPingPongResources(width: number, height: number, hdr?: boolean): WebGL2BloomPingPongResources;
168
175
  ensureBloomLutTextures(options: NativeBloomOptions): void;
@@ -171,7 +178,7 @@ export declare class WebGL2LegacyPostPipeline {
171
178
  ensureMotionBlurVelocityTexture(width: number, height: number, velocity: Float32Array): void;
172
179
  ensureTaaHistoryTexture(width: number, height: number, history: Uint8Array): void;
173
180
  drawNativeLdrStage(sourceTexture: WebGLTexture, framebuffer: WebGLFramebuffer | null, width: number, height: number, vertexArray: WebGLVertexArrayObject, tonePass: LdrPostprocessPassDescriptor | undefined, colorPass: LdrPostprocessPassDescriptor | undefined, fxaaPass: LdrPostprocessPassDescriptor | undefined, toneMappingDefaults: Readonly<Record<string, unknown>> | undefined): void;
174
- executeNativeBloomPasses(sourceTexture: WebGLTexture, resources: WebGL2BloomPingPongResources, options: NativeBloomOptions, vertexArray: WebGLVertexArrayObject, hdr: boolean): WebGLTexture;
181
+ executeNativeBloomPasses(sourceTexture: WebGLTexture, resources: WebGL2BloomPingPongResources, options: NativeBloomOptions, vertexArray: WebGLVertexArrayObject, hdr: boolean, destination?: WebGL2RenderTarget): WebGLTexture;
175
182
  executeNativeBloomPyramidPasses(sourceTexture: WebGLTexture, sourceWidth: number, sourceHeight: number, resources: WebGL2BloomPyramidResources, fullResStaging: {
176
183
  textureA: WebGLTexture;
177
184
  framebufferA: WebGLFramebuffer;
@@ -243,7 +250,9 @@ export declare function normalizeNativeBloomOptions(options: Readonly<Record<str
243
250
  * chain applies exposure here, the final graph applies it in S10 composite
244
251
  * and this pass receives `1`.
245
252
  */
246
- export declare function createLegacyOutputPass(pipeline: PostPipelineOptions, base?: Readonly<Record<string, unknown>>): LdrPostprocessPassDescriptor;
253
+ export declare function createLegacyOutputPass(pipeline: PostPipelineOptions, base?: Readonly<Record<string, unknown>>,
254
+ /** The authored vignette, folded into the OUT stage so it composes in linear light before the single tone map. */
255
+ vignette?: PostPipelineOptions["vignette"]): LdrPostprocessPassDescriptor;
247
256
  /**
248
257
  * `executePostGraphWebGL2` — the C-13 device carve (CONTRACTS §3.1 /
249
258
  * PRD-03 §7.2). It receives the device's GL internals (the registered
@@ -1 +1 @@
1
- {"version":3,"file":"LegacyPost.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgl2/LegacyPost.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4C,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,KAAK,iCAAiC,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvM,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAsJ,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvP,OAAO,KAAK,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AACvG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW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AO,GAAG,IAAI,CAAC;YACtD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;YAC5B,QAAQ,CAAC,SAAS,EAAE;gBAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;aAAE,CAAC;SACrG,CAAC;KACH,CAAC;IACF,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,oBAAoB,EAAE,mBAAmB,CAAC;IACrE,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACvE,GACA,IAAI,CAmKN;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,spEA4DrC,CAAC"}
@@ -9,7 +9,10 @@ import { BLOOM_BRIGHT_LUT_HEIGHT, BLOOM_BRIGHT_LUT_WIDTH, BLOOM_COMPOSITE_LUT_SI
9
9
  // split is opt-in via `fxaa: { variant: "r185" }`; the legacy in-shader
10
10
  // `u_hasFxaa` taps stay the default path.
11
11
  import { FXAA_185_FRAGMENT_GLSL } from "../post/shaders/fxaa.glsl.js";
12
- import { recordPostSkipped } from "../renderer/postSkipped.js";
12
+ import { recordPostSkipped, recordPostStage } from "../renderer/postSkipped.js";
13
+ import { vignetteColorRgb } from "../post/vignetteColor.js";
14
+ import { outputPassForDevice } from "../output/OutputPass.js";
15
+ import { TONE_MAP_OPERATOR_FUNCTIONS } from "../output/ToneMappingOperators.glsl.js";
13
16
  import { ldrFragmentSource, ldrVariantKey } from "./LdrPostprocessShader.js";
14
17
  export class WebGL2LegacyPostPipeline {
15
18
  host;
@@ -301,6 +304,74 @@ export class WebGL2LegacyPostPipeline {
301
304
  }
302
305
  this.host.device.setRenderTarget(webglOutputTarget ?? null);
303
306
  }
307
+ /**
308
+ * PostGraph v2 bloom stage: runs the native HDR bloom over `source` and writes the
309
+ * composite (source + bloom) into the rgba16f `destination`, so the single tone map
310
+ * and encode run afterwards in the OutputPass. The same passes `presentLdrPostprocess`
311
+ * runs for a bloom descriptor, minus the fused tone/grade/FXAA stage.
312
+ */
313
+ presentHdrBloom(source, bloomOptionsRaw, destination) {
314
+ this.host.lifecycle.assertAlive();
315
+ if (!(source instanceof WebGL2RenderTarget) || !this.host.renderTargets.has(source) || source.disposed) {
316
+ throw new RenderDeviceError("Render target is not a live WebGL2 resource owned by this device", "INVALID_RESOURCE", { targetId: source.id });
317
+ }
318
+ if (!(destination instanceof WebGL2RenderTarget) || !this.host.renderTargets.has(destination) || destination.disposed
319
+ || destination.colorTexture.format !== "rgba16f" || destination.width !== source.width || destination.height !== source.height) {
320
+ throw new RenderDeviceError("HDR bloom destination must be a live rgba16f WebGL2 target matching the source size.", "INVALID_RESOURCE", { targetId: destination.id });
321
+ }
322
+ if (source.colorTexture.format === "rgba8") {
323
+ throw new RenderDeviceError("HDR bloom requires a floating-point source target.", "WEBGL_LDR_POSTPROCESS_FORMAT_UNSUPPORTED", { targetId: source.id });
324
+ }
325
+ this.host.resolveMultisampleTarget(source);
326
+ const bloomOptions = normalizeNativeBloomOptions({ ...bloomOptionsRaw, v2: true });
327
+ const vertexArray = this.ensurePresentationVertexArray();
328
+ const resources = this.ensureBloomPingPongResources(source.width, source.height, true);
329
+ const previousState = this.prepareFullscreenPresentation(destination.framebuffer, source.width, source.height);
330
+ try {
331
+ if (bloomOptions.quality === "performance") {
332
+ this.executeNativeBloomPasses(source.colorHandle, resources, bloomOptions, vertexArray, true, destination);
333
+ this.recordBloomDiagnostics(bloomOptions, source.width, source.height, true, 1);
334
+ }
335
+ else {
336
+ const plan = resolveBloomPyramidPlan(source.width, source.height, bloomOptions.quality, true);
337
+ const pyramid = this.ensureBloomPyramidResources(plan, true);
338
+ const pyramidResult = this.executeNativeBloomPyramidPasses(source.colorHandle, source.width, source.height, pyramid, {
339
+ textureA: resources.textures[0],
340
+ framebufferA: resources.framebuffers[0],
341
+ textureB: resources.textures[1],
342
+ framebufferB: resources.framebuffers[1]
343
+ }, bloomOptions, vertexArray, true);
344
+ this.host.gl.bindFramebuffer(this.host.gl.FRAMEBUFFER, destination.framebuffer);
345
+ this.host.gl.viewport(0, 0, source.width, source.height);
346
+ const composite = this.ensureBloomCompositeProgram();
347
+ this.host.gl.useProgram(composite);
348
+ this.host.gl.bindVertexArray(vertexArray);
349
+ this.bindFullscreenTexture(0, source.colorHandle);
350
+ this.bindFullscreenTexture(1, pyramidResult);
351
+ if (this.bloomCompositeLutTexture)
352
+ this.bindFullscreenTexture(2, this.bloomCompositeLutTexture);
353
+ this.host.gl.uniform1i(this.host.gl.getUniformLocation(composite, "u_source"), 0);
354
+ this.host.gl.uniform1i(this.host.gl.getUniformLocation(composite, "u_blurred"), 1);
355
+ this.host.gl.uniform1i(this.host.gl.getUniformLocation(composite, "u_compositeLut"), 2);
356
+ this.host.gl.uniform1i(this.host.gl.getUniformLocation(composite, "u_hdr"), 1);
357
+ this.host.gl.uniform1f(this.host.gl.getUniformLocation(composite, "u_intensity"), bloomOptions.intensity * nativeBloomResponseGain(plan, bloomOptions));
358
+ this.host.gl.drawArrays(this.host.gl.TRIANGLES, 0, 3);
359
+ this.recordBloomDiagnostics(bloomOptions, source.width, source.height, true, plan.mipCount);
360
+ }
361
+ this.host.gl.flush();
362
+ }
363
+ finally {
364
+ this.restoreFullscreenPresentationState(previousState, source.width, source.height);
365
+ this.host.stateCache.invalidate();
366
+ }
367
+ this.host.lifecycle.lastError = this.host.lifecycle.readError();
368
+ if (this.host.lifecycle.lastError) {
369
+ throw new RenderDeviceError(`WebGL2 HDR bloom failed: ${this.host.lifecycle.lastError}`, "WEBGL_LDR_POSTPROCESS_FAILED", {
370
+ targetId: source.id,
371
+ error: this.host.lifecycle.lastError
372
+ });
373
+ }
374
+ }
304
375
  drawRenderTargetToBackbuffer(source, outputWidth, outputHeight) {
305
376
  const program = this.ensurePresentationProgram();
306
377
  const vertexArray = this.ensurePresentationVertexArray();
@@ -488,8 +559,10 @@ export class WebGL2LegacyPostPipeline {
488
559
  const toneOptions = { ...(toneMappingDefaults ?? {}), ...(tonePass?.options ?? {}) };
489
560
  const colorOptions = colorPass?.options ?? {};
490
561
  const fxaaOptions = fxaaPass?.options ?? {};
562
+ const toneVignette = tonePass ? linearVignetteOption(toneOptions) : undefined;
491
563
  const program = this.ensureLdrPostprocessProgram({
492
564
  toneMapping: Boolean(tonePass),
565
+ vignette: toneVignette !== undefined,
493
566
  operator: toneMappingOperatorId(stringOption(toneOptions, "operator", "reinhard")),
494
567
  inputSrgb: colorSpaceId(stringOption(toneOptions, "inputColorSpace", "linear")) === 1,
495
568
  outputSrgb: colorSpaceId(stringOption(toneOptions, "outputColorSpace", "linear")) === 1,
@@ -521,9 +594,15 @@ export class WebGL2LegacyPostPipeline {
521
594
  this.host.gl.uniform1i(this.host.gl.getUniformLocation(program, "u_hasFxaa"), fxaaPass ? 1 : 0);
522
595
  this.host.gl.uniform1f(this.host.gl.getUniformLocation(program, "u_edgeThreshold"), numberOption(fxaaOptions, "edgeThreshold", 0.125));
523
596
  this.host.gl.uniform1f(this.host.gl.getUniformLocation(program, "u_subpixelBlend"), numberOption(fxaaOptions, "subpixelBlend", 0.75));
597
+ if (toneVignette) {
598
+ this.host.gl.uniform1f(this.host.gl.getUniformLocation(program, "u_vignetteIntensity"), toneVignette.intensity);
599
+ this.host.gl.uniform1f(this.host.gl.getUniformLocation(program, "u_vignetteSmoothness"), toneVignette.smoothness);
600
+ this.host.gl.uniform1f(this.host.gl.getUniformLocation(program, "u_vignetteRoundness"), toneVignette.roundness);
601
+ this.host.gl.uniform3f(this.host.gl.getUniformLocation(program, "u_vignetteColor"), toneVignette.color[0], toneVignette.color[1], toneVignette.color[2]);
602
+ }
524
603
  this.host.gl.drawArrays(this.host.gl.TRIANGLES, 0, 3);
525
604
  }
526
- executeNativeBloomPasses(sourceTexture, resources, options, vertexArray, hdr) {
605
+ executeNativeBloomPasses(sourceTexture, resources, options, vertexArray, hdr, destination) {
527
606
  const brightLut = this.bloomBrightLutTexture;
528
607
  const compositeLut = this.bloomCompositeLutTexture;
529
608
  if (!hdr && (!brightLut || !compositeLut)) {
@@ -561,7 +640,7 @@ export class WebGL2LegacyPostPipeline {
561
640
  this.host.gl.uniform1i(this.host.gl.getUniformLocation(blurProgram, "u_horizontal"), 0);
562
641
  this.host.gl.drawArrays(this.host.gl.TRIANGLES, 0, 3);
563
642
  const compositeProgram = this.ensureBloomCompositeProgram();
564
- this.host.gl.bindFramebuffer(this.host.gl.FRAMEBUFFER, framebufferB);
643
+ this.host.gl.bindFramebuffer(this.host.gl.FRAMEBUFFER, destination?.framebuffer ?? framebufferB);
565
644
  this.host.gl.useProgram(compositeProgram);
566
645
  this.bindFullscreenTexture(0, sourceTexture);
567
646
  this.bindFullscreenTexture(1, textureA);
@@ -573,7 +652,7 @@ export class WebGL2LegacyPostPipeline {
573
652
  this.host.gl.uniform1i(this.host.gl.getUniformLocation(compositeProgram, "u_hdr"), hdr ? 1 : 0);
574
653
  this.host.gl.uniform1f(this.host.gl.getUniformLocation(compositeProgram, "u_intensity"), options.intensity);
575
654
  this.host.gl.drawArrays(this.host.gl.TRIANGLES, 0, 3);
576
- return textureB;
655
+ return destination ? destination.colorHandle : textureB;
577
656
  }
578
657
  executeNativeBloomPyramidPasses(sourceTexture, sourceWidth, sourceHeight, resources, fullResStaging, options, vertexArray, hdr) {
579
658
  const plan = resources.plan;
@@ -2121,6 +2200,23 @@ function taaNumberOption(options, key, fallback) {
2121
2200
  }
2122
2201
  return value;
2123
2202
  }
2203
+ /** The linear-light vignette a tone-mapping descriptor carries (`options.vignette`), or undefined when it is off. */
2204
+ function linearVignetteOption(toneOptions) {
2205
+ const raw = toneOptions.vignette;
2206
+ if (raw === null || typeof raw !== "object")
2207
+ return undefined;
2208
+ const v = raw;
2209
+ const intensity = typeof v.intensity === "number" && Number.isFinite(v.intensity) ? v.intensity : 0;
2210
+ if (intensity <= 0)
2211
+ return undefined;
2212
+ const finite = (n, fallback) => (typeof n === "number" && Number.isFinite(n) ? n : fallback);
2213
+ return {
2214
+ intensity,
2215
+ smoothness: finite(v.smoothness, 1),
2216
+ roundness: finite(v.roundness, 1),
2217
+ color: vignetteColorRgb(v.color)
2218
+ };
2219
+ }
2124
2220
  function toneMappingOperatorId(value) {
2125
2221
  if (value === "linear")
2126
2222
  return 0;
@@ -2146,12 +2242,15 @@ function toneMappingOperatorId(value) {
2146
2242
  * chain applies exposure here, the final graph applies it in S10 composite
2147
2243
  * and this pass receives `1`.
2148
2244
  */
2149
- export function createLegacyOutputPass(pipeline, base) {
2245
+ export function createLegacyOutputPass(pipeline, base,
2246
+ /** The authored vignette, folded into the OUT stage so it composes in linear light before the single tone map. */
2247
+ vignette) {
2150
2248
  const operator = pipeline.toneMapping === "none" ? "linear" : pipeline.toneMapping;
2151
2249
  return {
2152
2250
  name: "tone-mapping",
2153
2251
  options: {
2154
2252
  ...(base ?? {}),
2253
+ ...(vignette ? { vignette } : {}),
2155
2254
  operator,
2156
2255
  exposure: pipeline.exposure,
2157
2256
  inputColorSpace: "srgb-linear",
@@ -2162,6 +2261,22 @@ export function createLegacyOutputPass(pipeline, base) {
2162
2261
  }
2163
2262
  };
2164
2263
  }
2264
+ /** The OutputPass OUT-stage configuration for a v2 chain, or undefined when the chain needs the fused present. */
2265
+ function outputPassRouteTone(passes, pipeline, source, host) {
2266
+ if (source.colorTexture.format === "rgba8" || !host.device)
2267
+ return undefined;
2268
+ if (!passes.every((pass) => pass.name === "tone-mapping" || pass.name === "bloom"))
2269
+ return undefined;
2270
+ const tonePass = passes.find((pass) => pass.name === "tone-mapping");
2271
+ const whitePoint = tonePass?.options?.whitePoint;
2272
+ if (whitePoint !== undefined && whitePoint !== 1)
2273
+ return undefined;
2274
+ const operator = pipeline.toneMapping === "none" ? "linear" : pipeline.toneMapping;
2275
+ if (!TONE_MAP_OPERATOR_FUNCTIONS[operator])
2276
+ return undefined;
2277
+ const vignette = linearVignetteOption({ vignette: pipeline.vignette });
2278
+ return { operator, vignette: vignette ? { intensity: vignette.intensity, smoothness: vignette.smoothness, roundness: vignette.roundness, color: vignette.color } : undefined };
2279
+ }
2165
2280
  /**
2166
2281
  * `executePostGraphWebGL2` — the C-13 device carve (CONTRACTS §3.1 /
2167
2282
  * PRD-03 §7.2). It receives the device's GL internals (the registered
@@ -2194,7 +2309,14 @@ export function executePostGraphWebGL2(host, source, request) {
2194
2309
  workSource = hdrResult.target;
2195
2310
  afterBloomStage = hdrResult.afterBloom;
2196
2311
  }
2197
- const needsTail = Boolean(v2 && v2.v2NeedsLdrTail(pipeline));
2312
+ // The vignette is a light falloff: it composes in linear light inside the single OUT
2313
+ // stage (before the one tone map and encode) instead of darkening display-referred
2314
+ // bytes in the LDR tail. The OUT stage always exists on this route — a tone-mapping
2315
+ // descriptor, or the linear OutputPass injected for `toneMapping: "none"`.
2316
+ const vignetteInOut = Boolean(pipeline.vignette)
2317
+ && (request.passes.some((pass) => pass.name === "tone-mapping") || pipeline.toneMapping === "none");
2318
+ const tailPipeline = vignetteInOut ? { ...pipeline, vignette: undefined } : pipeline;
2319
+ const needsTail = Boolean(v2 && v2.v2NeedsLdrTail(tailPipeline));
2198
2320
  const ldrTailTarget = needsTail && v2
2199
2321
  ? v2.acquireV2Target(host, { width: source.width, height: source.height, format: "rgba8" })
2200
2322
  : undefined;
@@ -2203,19 +2325,72 @@ export function executePostGraphWebGL2(host, source, request) {
2203
2325
  const pipelineForOut = needsTail && pipeline.dither !== false
2204
2326
  ? { ...pipeline, dither: false }
2205
2327
  : pipeline;
2206
- const mappedPasses = request.passes
2207
- // §6.9/T0-17 (FLAG-ON-4): on the v2 chain the HDR stages own their
2208
- // effects — S2 GTAO (ssao), S6 (depth-of-field), S7 (motion-blur),
2209
- // S5 (taa). The legacy twin must not double-run, and its native depth
2210
- // read would throw WEBGL_LDR_POSTPROCESS_DEPTH_REQUIRED per frame on
2211
- // the pooled depth-less stage output.
2328
+ // §6.9/T0-17 (FLAG-ON-4): on the v2 chain the HDR stages own their
2329
+ // effects — S2 GTAO (ssao), S6 (depth-of-field), S7 (motion-blur),
2330
+ // S5 (taa). The legacy twin must not double-run, and its native depth
2331
+ // read would throw WEBGL_LDR_POSTPROCESS_DEPTH_REQUIRED per frame on
2332
+ // the pooled depth-less stage output.
2333
+ const v2Passes = request.passes
2212
2334
  .filter((pass) => !(v2 && ((pipeline.ao && pass.name === "ssao")
2213
2335
  || (pipeline.dof && pass.name === "depth-of-field")
2214
2336
  || (pipeline.motionBlur && pass.name === "motion-blur")
2215
- || ((pipeline.antiAliasing === "taa" || Boolean(pipeline.taa)) && pass.name === "taa"))))
2337
+ || ((pipeline.antiAliasing === "taa" || Boolean(pipeline.taa)) && pass.name === "taa"))));
2338
+ // The single tone map and sRGB encode run in the OutputPass whenever the remaining
2339
+ // descriptors are only bloom and tone mapping (every effect before them composes in
2340
+ // linear HDR); chains with legacy display-space kernels (ssr, outline, grade, fxaa
2341
+ // descriptors) or a non-default white point keep the fused present.
2342
+ const outputPassTone = v2 ? outputPassRouteTone(v2Passes, pipeline, source, host) : undefined;
2343
+ if (v2 && outputPassTone) {
2344
+ const bloomPass = v2Passes.find((pass) => pass.name === "bloom");
2345
+ const owned = [];
2346
+ try {
2347
+ let current = workSource;
2348
+ if (bloomPass) {
2349
+ const bloomed = v2.acquireV2Target(host, { width: source.width, height: source.height, format: "rgba16f" });
2350
+ owned.push(bloomed);
2351
+ host.post.presentHdrBloom(workSource, bloomPass.options, bloomed);
2352
+ current = bloomed;
2353
+ if (afterBloomStage) {
2354
+ afterBloomRan = true;
2355
+ current = afterBloomStage.run(bloomed);
2356
+ }
2357
+ }
2358
+ else {
2359
+ host.resolveMultisampleTarget(workSource);
2360
+ }
2361
+ // Bind the final destination first: the OutputPass restores the previously bound target, so the
2362
+ // frame ends on the default framebuffer (or the explicit output target), never on an HDR target.
2363
+ host.device.setRenderTarget(request.outputTarget ?? null);
2364
+ // `dither: false`: the S12 finalize owns the one triangular dither when a tail exists, and
2365
+ // the fused OUT this replaces never dithered; the chain's output must not change.
2366
+ outputPassForDevice(host.device).execute(current, null, {
2367
+ toneMapping: outputPassTone.operator,
2368
+ exposure: pipelineForOut.exposure,
2369
+ dithering: false,
2370
+ backgroundCoverage: false,
2371
+ fullCoverage: true,
2372
+ ...(vignetteInOut && outputPassTone.vignette ? { vignette: outputPassTone.vignette } : {})
2373
+ }, ldrTailTarget ?? request.outputTarget ?? "canvas");
2374
+ }
2375
+ finally {
2376
+ afterBloomStage?.release();
2377
+ for (const target of owned)
2378
+ v2.releaseV2Target(host, target);
2379
+ }
2380
+ if (workSource !== source)
2381
+ v2.releaseV2Target(host, workSource);
2382
+ if (ldrTailTarget) {
2383
+ v2.runV2LdrTail(host, ldrTailTarget, tailPipeline, request.outputTarget, request.frameContext);
2384
+ v2.releaseV2Target(host, ldrTailTarget);
2385
+ }
2386
+ host.device.setRenderTarget(request.outputTarget ?? null);
2387
+ recordPostStage("out:output-pass");
2388
+ return;
2389
+ }
2390
+ const mappedPasses = v2Passes
2216
2391
  .map((pass) => {
2217
2392
  if (pass.name === "tone-mapping") {
2218
- return createLegacyOutputPass(pipelineForOut, pass.options);
2393
+ return createLegacyOutputPass(pipelineForOut, pass.options, vignetteInOut ? pipeline.vignette : undefined);
2219
2394
  }
2220
2395
  if (pass.name === "bloom") {
2221
2396
  return { name: pass.name, options: { ...pass.options, v2: true } };
@@ -2242,7 +2417,7 @@ export function executePostGraphWebGL2(host, source, request) {
2242
2417
  // OutputPass (createLegacyOutputPass maps 'none' to the linear operator)
2243
2418
  // instead of throwing WEBGL_LDR_POSTPROCESS_FORMAT_UNSUPPORTED per frame.
2244
2419
  const passes = pipeline.toneMapping === "none" && !depthSkippedPasses.some((pass) => pass.name === "tone-mapping")
2245
- ? [...depthSkippedPasses, createLegacyOutputPass(pipelineForOut)]
2420
+ ? [...depthSkippedPasses, createLegacyOutputPass(pipelineForOut, undefined, vignetteInOut ? pipeline.vignette : undefined)]
2246
2421
  : depthSkippedPasses;
2247
2422
  try {
2248
2423
  host.post.presentLdrPostprocess(workSource, {
@@ -2272,7 +2447,7 @@ export function executePostGraphWebGL2(host, source, request) {
2272
2447
  if (workSource !== source && v2)
2273
2448
  v2.releaseV2Target(host, workSource);
2274
2449
  if (ldrTailTarget && v2) {
2275
- v2.runV2LdrTail(host, ldrTailTarget, pipeline, request.outputTarget, request.frameContext);
2450
+ v2.runV2LdrTail(host, ldrTailTarget, tailPipeline, request.outputTarget, request.frameContext);
2276
2451
  v2.releaseV2Target(host, ldrTailTarget);
2277
2452
  }
2278
2453
  }