@aura3d/rendering 4.3.7 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/DepthPass.d.ts +7 -0
  2. package/dist/DepthPass.d.ts.map +1 -1
  3. package/dist/DepthPass.js +43 -6
  4. package/dist/DepthPass.js.map +1 -1
  5. package/dist/ForwardPass.d.ts +82 -5
  6. package/dist/ForwardPass.d.ts.map +1 -1
  7. package/dist/ForwardPass.js +180 -35
  8. package/dist/ForwardPass.js.map +1 -1
  9. package/dist/MaterialBinding.js +6 -2
  10. package/dist/MaterialBinding.js.map +1 -1
  11. package/dist/RenderDevice.d.ts +5 -0
  12. package/dist/RenderDevice.d.ts.map +1 -1
  13. package/dist/RenderDevice.js.map +1 -1
  14. package/dist/Renderer.d.ts +8 -0
  15. package/dist/Renderer.d.ts.map +1 -1
  16. package/dist/Renderer.js +37 -6
  17. package/dist/Renderer.js.map +1 -1
  18. package/dist/RendererPostprocessPlan.d.ts.map +1 -1
  19. package/dist/RendererPostprocessPlan.js +8 -1
  20. package/dist/RendererPostprocessPlan.js.map +1 -1
  21. package/dist/ShaderChunks.d.ts.map +1 -1
  22. package/dist/ShaderChunks.js +3 -1
  23. package/dist/ShaderChunks.js.map +1 -1
  24. package/dist/ShaderLibrary.d.ts.map +1 -1
  25. package/dist/ShaderLibrary.js +17 -5
  26. package/dist/ShaderLibrary.js.map +1 -1
  27. package/dist/ShaderLibraryCore.d.ts.map +1 -1
  28. package/dist/ShaderLibraryCore.js +2 -1
  29. package/dist/ShaderLibraryCore.js.map +1 -1
  30. package/dist/WebGL2Device.d.ts +19 -1
  31. package/dist/WebGL2Device.d.ts.map +1 -1
  32. package/dist/WebGL2Device.js +114 -37
  33. package/dist/WebGL2Device.js.map +1 -1
  34. package/dist/WebGL2StateCache.d.ts +22 -0
  35. package/dist/WebGL2StateCache.d.ts.map +1 -1
  36. package/dist/WebGL2StateCache.js +71 -42
  37. package/dist/WebGL2StateCache.js.map +1 -1
  38. package/dist/contracts/core.d.ts.map +1 -1
  39. package/dist/contracts/core.js +22 -2
  40. package/dist/contracts/core.js.map +1 -1
  41. package/dist/contracts/program.d.ts.map +1 -1
  42. package/dist/contracts/program.js +8 -1
  43. package/dist/contracts/program.js.map +1 -1
  44. package/dist/contracts/quality.d.ts +21 -0
  45. package/dist/contracts/quality.d.ts.map +1 -1
  46. package/dist/contracts/quality.js +5 -0
  47. package/dist/contracts/quality.js.map +1 -1
  48. package/dist/contracts/renderItem.d.ts +6 -0
  49. package/dist/contracts/renderItem.d.ts.map +1 -1
  50. package/dist/contracts/structuralMemo.d.ts +23 -0
  51. package/dist/contracts/structuralMemo.d.ts.map +1 -0
  52. package/dist/contracts/structuralMemo.js +81 -0
  53. package/dist/contracts/structuralMemo.js.map +1 -0
  54. package/dist/environment/EnvironmentCache.d.ts.map +1 -1
  55. package/dist/environment/EnvironmentCache.js +6 -1
  56. package/dist/environment/EnvironmentCache.js.map +1 -1
  57. package/dist/environment/FirstFrameGate.d.ts +23 -0
  58. package/dist/environment/FirstFrameGate.d.ts.map +1 -0
  59. package/dist/environment/FirstFrameGate.js +58 -0
  60. package/dist/environment/FirstFrameGate.js.map +1 -0
  61. package/dist/environment/Rgb9e5Cube.d.ts.map +1 -1
  62. package/dist/environment/Rgb9e5Cube.js +8 -4
  63. package/dist/environment/Rgb9e5Cube.js.map +1 -1
  64. package/dist/environment/probeBuild.d.ts +29 -0
  65. package/dist/environment/probeBuild.d.ts.map +1 -1
  66. package/dist/environment/probeBuild.js +124 -45
  67. package/dist/environment/probeBuild.js.map +1 -1
  68. package/dist/forward/Lighting.d.ts +43 -3
  69. package/dist/forward/Lighting.d.ts.map +1 -1
  70. package/dist/forward/Lighting.js +127 -17
  71. package/dist/forward/Lighting.js.map +1 -1
  72. package/dist/forward/contactShadowMaskStore.d.ts +41 -0
  73. package/dist/forward/contactShadowMaskStore.d.ts.map +1 -0
  74. package/dist/forward/contactShadowMaskStore.js +85 -0
  75. package/dist/forward/contactShadowMaskStore.js.map +1 -0
  76. package/dist/geometry/Shape.d.ts.map +1 -1
  77. package/dist/geometry/Shape.js +7 -2
  78. package/dist/geometry/Shape.js.map +1 -1
  79. package/dist/geometry/Support.d.ts +4 -0
  80. package/dist/geometry/Support.d.ts.map +1 -1
  81. package/dist/geometry/Support.js +3 -2
  82. package/dist/geometry/Support.js.map +1 -1
  83. package/dist/index.d.ts +6 -0
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js +5 -0
  86. package/dist/index.js.map +1 -1
  87. package/dist/passes/ContactShadowPass.d.ts +40 -3
  88. package/dist/passes/ContactShadowPass.d.ts.map +1 -1
  89. package/dist/passes/ContactShadowPass.js +73 -13
  90. package/dist/passes/ContactShadowPass.js.map +1 -1
  91. package/dist/passes/Prd02ContactShadowsContributor.d.ts +19 -0
  92. package/dist/passes/Prd02ContactShadowsContributor.d.ts.map +1 -1
  93. package/dist/passes/Prd02ContactShadowsContributor.js +179 -28
  94. package/dist/passes/Prd02ContactShadowsContributor.js.map +1 -1
  95. package/dist/post/v2Stages.d.ts.map +1 -1
  96. package/dist/post/v2Stages.js +2 -0
  97. package/dist/post/v2Stages.js.map +1 -1
  98. package/dist/program/ProgramFeatures.d.ts +6 -0
  99. package/dist/program/ProgramFeatures.d.ts.map +1 -1
  100. package/dist/program/ProgramFeatures.js +11 -5
  101. package/dist/program/ProgramFeatures.js.map +1 -1
  102. package/dist/program/ProgramGenerator.d.ts +6 -0
  103. package/dist/program/ProgramGenerator.d.ts.map +1 -1
  104. package/dist/program/ProgramGenerator.js +36 -1
  105. package/dist/program/ProgramGenerator.js.map +1 -1
  106. package/dist/program/ProgramKey.d.ts.map +1 -1
  107. package/dist/program/ProgramKey.js +4 -1
  108. package/dist/program/ProgramKey.js.map +1 -1
  109. package/dist/program/chunks/shadow_forward.glsl.d.ts +1 -1
  110. package/dist/program/chunks/shadow_forward.glsl.d.ts.map +1 -1
  111. package/dist/program/chunks/shadow_forward.glsl.js +4 -1
  112. package/dist/program/chunks/shadow_forward.glsl.js.map +1 -1
  113. package/dist/quality/DirectPath.d.ts +56 -0
  114. package/dist/quality/DirectPath.d.ts.map +1 -0
  115. package/dist/quality/DirectPath.js +74 -0
  116. package/dist/quality/DirectPath.js.map +1 -0
  117. package/dist/renderer/Background.d.ts +0 -5
  118. package/dist/renderer/Background.d.ts.map +1 -1
  119. package/dist/renderer/Background.js +56 -4
  120. package/dist/renderer/Background.js.map +1 -1
  121. package/dist/renderer/InstanceFrustumCull.d.ts +41 -0
  122. package/dist/renderer/InstanceFrustumCull.d.ts.map +1 -0
  123. package/dist/renderer/InstanceFrustumCull.js +138 -0
  124. package/dist/renderer/InstanceFrustumCull.js.map +1 -0
  125. package/dist/renderer/ShadowOrchestration.d.ts +2 -0
  126. package/dist/renderer/ShadowOrchestration.d.ts.map +1 -1
  127. package/dist/renderer/ShadowOrchestration.js +1 -0
  128. package/dist/renderer/ShadowOrchestration.js.map +1 -1
  129. package/dist/renderer/coreOutputPostRoute.d.ts +0 -5
  130. package/dist/renderer/coreOutputPostRoute.d.ts.map +1 -1
  131. package/dist/renderer/coreOutputPostRoute.js +12 -2
  132. package/dist/renderer/coreOutputPostRoute.js.map +1 -1
  133. package/dist/resources/InstanceBuffer.d.ts +2 -0
  134. package/dist/resources/InstanceBuffer.d.ts.map +1 -1
  135. package/dist/resources/InstanceBuffer.js +23 -0
  136. package/dist/resources/InstanceBuffer.js.map +1 -1
  137. package/dist/shaders/chunks/contact_shadow.glsl.d.ts +11 -6
  138. package/dist/shaders/chunks/contact_shadow.glsl.d.ts.map +1 -1
  139. package/dist/shaders/chunks/contact_shadow.glsl.js +41 -19
  140. package/dist/shaders/chunks/contact_shadow.glsl.js.map +1 -1
  141. package/dist/shaders/chunks/contact_shadow_mask.glsl.d.ts +12 -0
  142. package/dist/shaders/chunks/contact_shadow_mask.glsl.d.ts.map +1 -0
  143. package/dist/shaders/chunks/contact_shadow_mask.glsl.js +21 -0
  144. package/dist/shaders/chunks/contact_shadow_mask.glsl.js.map +1 -0
  145. package/dist/shaders/chunks/lighting_ibl.glsl.d.ts +6 -1
  146. package/dist/shaders/chunks/lighting_ibl.glsl.d.ts.map +1 -1
  147. package/dist/shaders/chunks/lighting_ibl.glsl.js +8 -2
  148. package/dist/shaders/chunks/lighting_ibl.glsl.js.map +1 -1
  149. package/dist/shadows/CascadeUse.d.ts +31 -0
  150. package/dist/shadows/CascadeUse.d.ts.map +1 -0
  151. package/dist/shadows/CascadeUse.js +60 -0
  152. package/dist/shadows/CascadeUse.js.map +1 -0
  153. package/dist/shadows/Prd02DepthShaderLibrary.d.ts +7 -1
  154. package/dist/shadows/Prd02DepthShaderLibrary.d.ts.map +1 -1
  155. package/dist/shadows/Prd02DepthShaderLibrary.js +12 -3
  156. package/dist/shadows/Prd02DepthShaderLibrary.js.map +1 -1
  157. package/dist/shadows/Prd02ShadowBridge.d.ts +12 -1
  158. package/dist/shadows/Prd02ShadowBridge.d.ts.map +1 -1
  159. package/dist/shadows/Prd02ShadowBridge.js +17 -5
  160. package/dist/shadows/Prd02ShadowBridge.js.map +1 -1
  161. package/dist/shadows/Prd02ShadowsContributor.d.ts +4 -0
  162. package/dist/shadows/Prd02ShadowsContributor.d.ts.map +1 -1
  163. package/dist/shadows/Prd02ShadowsContributor.js +3 -1
  164. package/dist/shadows/Prd02ShadowsContributor.js.map +1 -1
  165. package/dist/shadows/ShadowFilterTier.d.ts +51 -0
  166. package/dist/shadows/ShadowFilterTier.d.ts.map +1 -0
  167. package/dist/shadows/ShadowFilterTier.js +89 -0
  168. package/dist/shadows/ShadowFilterTier.js.map +1 -0
  169. package/dist/shadows/ShadowSystem.d.ts +15 -0
  170. package/dist/shadows/ShadowSystem.d.ts.map +1 -1
  171. package/dist/shadows/ShadowSystem.js +12 -2
  172. package/dist/shadows/ShadowSystem.js.map +1 -1
  173. package/dist/shadows/shadowLegacy.d.ts +12 -0
  174. package/dist/shadows/shadowLegacy.d.ts.map +1 -1
  175. package/dist/shadows/shadowLegacy.js +24 -0
  176. package/dist/shadows/shadowLegacy.js.map +1 -1
  177. package/dist/webgl2/BloomFusion.d.ts +31 -0
  178. package/dist/webgl2/BloomFusion.d.ts.map +1 -0
  179. package/dist/webgl2/BloomFusion.js +25 -0
  180. package/dist/webgl2/BloomFusion.js.map +1 -0
  181. package/dist/webgl2/ContextLifecycle.d.ts +14 -0
  182. package/dist/webgl2/ContextLifecycle.d.ts.map +1 -1
  183. package/dist/webgl2/ContextLifecycle.js +44 -5
  184. package/dist/webgl2/ContextLifecycle.js.map +1 -1
  185. package/dist/webgl2/LegacyPost.d.ts +30 -0
  186. package/dist/webgl2/LegacyPost.d.ts.map +1 -1
  187. package/dist/webgl2/LegacyPost.js +259 -27
  188. package/dist/webgl2/LegacyPost.js.map +1 -1
  189. package/dist/webgl2/MultiDraw.d.ts +2 -0
  190. package/dist/webgl2/MultiDraw.d.ts.map +1 -1
  191. package/dist/webgl2/MultiDraw.js +33 -7
  192. package/dist/webgl2/MultiDraw.js.map +1 -1
  193. package/dist/webgl2/Samplers.d.ts +10 -1
  194. package/dist/webgl2/Samplers.d.ts.map +1 -1
  195. package/dist/webgl2/Samplers.js +24 -1
  196. package/dist/webgl2/Samplers.js.map +1 -1
  197. package/dist/webgl2/TextureFormats.d.ts +12 -0
  198. package/dist/webgl2/TextureFormats.d.ts.map +1 -1
  199. package/dist/webgl2/TextureFormats.js +16 -0
  200. package/dist/webgl2/TextureFormats.js.map +1 -1
  201. package/package.json +3 -3
@@ -1,13 +1,22 @@
1
- // PRD-02 §6.5 — `prd02.contactShadows` frame contributor (phase
2
- // `after-opaque`, lane flag `A3D_QR_LIGHTING`, feature sub-flag
3
- // `A3D_QR_LIGHTING_CONTACT`). Runs ContactShadowPass when the scene opted in
4
- // (`effects.contactShadows` → `source.shadow.prd02Contact`), when the tier
5
- // allows it (C-27 `shadow.contact`, Ultra only in the frozen table — Q-11-3
6
- // asks for Medium/High), or when the sub-flag forces it. Opt-in works at any
7
- // tier except Low. Publishes the mask on the blackboard for the shading side
8
- // and records `contactShadows.passExecuted` for C-31 diagnostics.
1
+ // PRD-02 §6.5 — `prd02.contactShadows` frame contributor (lane flag
2
+ // `A3D_QR_LIGHTING`, feature sub-flag `A3D_QR_LIGHTING_CONTACT`). Runs
3
+ // ContactShadowPass when the scene opted in (`effects.contactShadows` →
4
+ // `source.shadow.prd02Contact`), when the tier allows it (C-27 `shadow.contact`,
5
+ // Ultra only in the frozen table — Q-11-3 asks for Medium/High), or when the
6
+ // sub-flag forces it. Opt-in works at any tier except Low. Records
7
+ // `contactShadows.passExecuted` for C-31 diagnostics.
8
+ //
9
+ // Two modes, never both in one frame:
10
+ // - feeds shading (explicit opt-in or sub-flag): phase `shadows`, before the forward pass, renders its own half
11
+ // resolution depth, and publishes the mask to the forward store. Needs a shadow-casting directional light,
12
+ // because the mask is marched along that sun and only the sun's visibility term samples it; without one the
13
+ // pass does not run and a diagnostic says why.
14
+ // - tier default (Ultra, no opt-in): phase `after-opaque` exactly as before WP-4 (scene depth, no extra depth
15
+ // pass, nothing published), so that path costs and renders what it always did.
9
16
  import { BaseRenderPass } from "../RenderPass.js";
10
17
  import { ContactShadowPass, CONTACT_MASK_BLACKBOARD_KEY } from "./ContactShadowPass.js";
18
+ import { contactShadowMask, contactShadowMaskDrawCounters, setContactShadowMask } from "../forward/contactShadowMaskStore.js";
19
+ import { MaterialInstance } from "../MaterialInstance.js";
11
20
  import { collectShadowSystemLights } from "../shadows/Prd02ShadowsContributor.js";
12
21
  import { resolvePrd02ShadowCasterVariant, prd02DepthFeatures, registerPrd02DepthShader, prd02ShadowCasterEligible } from "../shadows/Prd02DepthShaderLibrary.js";
13
22
  import { createLeanCoreShaderLibrary } from "../ShaderLibraryCore.js";
@@ -17,10 +26,27 @@ export const CONTACT_SHADOWS_SUB_FLAG = SUB_FLAG_CONTACT;
17
26
  let latestContactDiagnostics = {
18
27
  contactShadows: { passExecuted: false, depthSource: "none" }
19
28
  };
29
+ let latestContactDevice;
20
30
  /** Latest C-31 contact-shadow diagnostics (engine lane reads via rendering barrel). */
21
31
  export function prd02ContactShadowDiagnostics() {
22
- return latestContactDiagnostics;
32
+ const probe = latestContactDiagnostics.contactShadows.probe;
33
+ if (!probe || !latestContactDevice)
34
+ return latestContactDiagnostics;
35
+ // Probing runs only: add the forward pass's draw counters, read live so they cover the whole last frame.
36
+ return {
37
+ contactShadows: { ...latestContactDiagnostics.contactShadows, probe: { ...probe, drawCounters: { ...contactShadowMaskDrawCounters(latestContactDevice) } } }
38
+ };
23
39
  }
40
+ const warnedOnce = new Set();
41
+ /** One console warning per distinct message per page: a scene that asks for a mask nothing can show should hear about it once. */
42
+ function warnOnce(message) {
43
+ if (warnedOnce.has(message))
44
+ return;
45
+ warnedOnce.add(message);
46
+ console.warn(`[prd02.contactShadows] ${message}`);
47
+ }
48
+ export const CONTACT_SHADOWS_NO_SUN_REASON = "no-shadow-casting-directional-light";
49
+ export const CONTACT_SHADOWS_NO_CONSUMER_REASON = "no-drawn-program-samples-the-mask";
24
50
  /** `ctx.tier` is a settings object — recover its tier name (the ctx carries
25
51
  * the shared QUALITY_TIERS constants; fall back to shadow-shape matching). */
26
52
  function tierNameOf(ctx) {
@@ -77,41 +103,145 @@ function depthLibraryFor(device) {
77
103
  }
78
104
  return lib;
79
105
  }
106
+ /**
107
+ * Depth for the mask is rendered by the pass itself (half resolution, camera space) because the
108
+ * mask must exist BEFORE the forward pass samples it; the C-01 scene-depth copy only exists
109
+ * after the opaque pass. Every opaque item writes depth, including receivers authored with
110
+ * `castShadow: false` (floors): the march needs the receiver surface, not just the casters.
111
+ */
112
+ function contactDepthEligible(item) {
113
+ if (item.castShadow !== false)
114
+ return prd02ShadowCasterEligible(item);
115
+ const material = item.material;
116
+ const base = material instanceof MaterialInstance ? material.baseMaterial : material;
117
+ return base?.renderState.blend !== true;
118
+ }
119
+ /**
120
+ * Orthographic cameras do not always say so: the frame camera's `projection` defaults to "perspective" when the scene
121
+ * camera has no such field (OrthographicCamera has none), which on the first GPU orthographic run left the mask at all
122
+ * ones. The combined view-projection settles it: an orthographic matrix leaves clip w at exactly 1 (fourth row 0,0,0,1;
123
+ * column-major elements 3, 7, 11, 15), a perspective one does not.
124
+ */
125
+ export function isOrthographicFrameCamera(camera) {
126
+ if (camera.projection === "orthographic")
127
+ return true;
128
+ const m = camera.viewProjectionMatrix;
129
+ if (m.length < 16)
130
+ return false;
131
+ const eps = 1e-6;
132
+ return Math.abs(m[3]) < eps && Math.abs(m[7]) < eps && Math.abs(m[11]) < eps && Math.abs(m[15] - 1) < eps;
133
+ }
134
+ // One pass per device: the mask and depth targets are allocated lazily by the pass, so a pass per
135
+ // frame would leak two render targets every frame.
136
+ const contactPasses = new WeakMap();
80
137
  class Prd02ContactShadowsRenderPass extends BaseRenderPass {
81
138
  ctx;
139
+ request;
140
+ mode;
82
141
  pass;
83
- constructor(ctx, request) {
142
+ sunTowardLight;
143
+ casterCount;
144
+ constructor(ctx, request, mode, sunDirection) {
84
145
  super("prd02.contactShadows", [], []);
85
146
  this.ctx = ctx;
86
- const { sunDirection } = collectShadowSystemLights(ctx);
87
- this.pass = new ContactShadowPass({
88
- sunDirection: sunDirection ?? [0, -1, 0],
89
- camera: ctx.camera ?? {
90
- viewMatrix: new Float32Array(16).fill(0),
91
- projectionMatrix: new Float32Array(16).fill(0),
92
- near: 0.1,
93
- far: 100
94
- },
95
- sceneDepth: ctx.sceneDepth,
96
- casters: ctx.items.filter(prd02ShadowCasterEligible),
147
+ this.request = request;
148
+ this.mode = mode;
149
+ const shading = mode === "shading";
150
+ // `CollectedLight.direction` is the direction the light travels; the march wants the direction
151
+ // TOWARD the light (the forward shaders use `lightDirection = -direction` the same way).
152
+ const input = {
153
+ sunDirection: sunDirection ? [-sunDirection[0], -sunDirection[1], -sunDirection[2]] : [0, 1, 0],
154
+ camera: ctx.camera
155
+ ? {
156
+ viewMatrix: ctx.camera.viewMatrix,
157
+ projectionMatrix: ctx.camera.projectionMatrix,
158
+ // The frame camera's separate view/projection can be identity (the production renderer resolves
159
+ // cameras that expose only a combined matrix), so the march works from the combined one.
160
+ viewProjectionMatrix: ctx.camera.viewProjectionMatrix,
161
+ near: ctx.camera.near,
162
+ far: ctx.camera.far,
163
+ orthographic: isOrthographicFrameCamera(ctx.camera)
164
+ }
165
+ : {
166
+ viewMatrix: new Float32Array(16).fill(0),
167
+ projectionMatrix: new Float32Array(16).fill(0),
168
+ near: 0.1,
169
+ far: 100
170
+ },
171
+ // Shading mode: forward has not run yet in the `shadows` phase, so the pass renders its own depth.
172
+ // Tier-default mode: the C-01 scene depth copy exists after the opaque pass, as before WP-4.
173
+ ...(shading ? {} : { sceneDepth: ctx.sceneDepth }),
174
+ casters: shading ? ctx.items.filter(contactDepthEligible) : ctx.items.filter(prd02ShadowCasterEligible),
97
175
  depthPassOptions: {
98
176
  shaderLibrary: depthLibraryFor(ctx.device),
99
177
  variantResolver: (item) => resolvePrd02ShadowCasterVariant(item, ctx.flags, ctx.tier, prd02DepthFeatures()),
100
178
  depthVariantFeatures: prd02DepthFeatures()
101
179
  },
102
180
  options: request
103
- });
181
+ };
182
+ let pass = contactPasses.get(ctx.device);
183
+ if (pass)
184
+ pass.configure(input);
185
+ else {
186
+ pass = new ContactShadowPass(input);
187
+ contactPasses.set(ctx.device, pass);
188
+ }
189
+ this.pass = pass;
190
+ this.sunTowardLight = input.sunDirection;
191
+ this.casterCount = input.casters.length;
104
192
  }
105
193
  execute(context) {
106
194
  this.pass.execute(context);
107
- this.ctx.blackboard.set(CONTACT_MASK_BLACKBOARD_KEY, this.pass.maskTexture());
195
+ const mask = this.pass.maskTexture();
196
+ this.ctx.blackboard.set(CONTACT_MASK_BLACKBOARD_KEY, mask);
197
+ latestContactDevice = this.ctx.device;
198
+ let unavailable;
199
+ if (this.mode === "shading") {
200
+ // The forward counters still hold the PREVIOUS frame's draws here (they reset on publish): a mask that
201
+ // was published but that no drawn program sampled means the effect is silently doing nothing.
202
+ const last = contactShadowMaskDrawCounters(this.ctx.device);
203
+ if (contactShadowMask(this.ctx.device) !== undefined && last.calls > 0 && last.maskedDraws === 0) {
204
+ unavailable = CONTACT_SHADOWS_NO_CONSUMER_REASON;
205
+ warnOnce("effects.contactShadows() has no visible effect: no drawn program samples the mask. The mask darkens the shadow-casting sun's light on materials that receive shadows; textured-PBR materials with glTF extension textures (clearcoat, transmission and similar) do not sample it.");
206
+ }
207
+ // Publish only a mask that was actually marched against real depth; the empty fallback mask
208
+ // (all ones) is harmless but binding it would cost a texture fetch per fragment for nothing.
209
+ const intensity = this.request.intensity ?? 1;
210
+ const position = this.ctx.camera?.position ?? [0, 0, 0];
211
+ setContactShadowMask(this.ctx.device, mask && this.pass.passExecuted() && intensity > 0
212
+ ? { texture: mask, width: context.width, height: context.height, strength: intensity, cameraPosition: [position[0], position[1], position[2]] }
213
+ : undefined);
214
+ }
215
+ const probing = globalThis.__A3D_CONTACT_PROBE__ === true;
108
216
  latestContactDiagnostics = {
109
217
  contactShadows: {
110
218
  passExecuted: this.pass.passExecuted(),
111
- depthSource: this.pass.depthSource()
219
+ depthSource: this.pass.depthSource(),
220
+ ...(unavailable ? { unavailable } : {}),
221
+ ...(probing ? { probe: this.collectProbe(context) } : {})
112
222
  }
113
223
  };
114
224
  }
225
+ collectProbe(context) {
226
+ const camera = this.ctx.camera;
227
+ return {
228
+ ...this.pass.probe(context.device),
229
+ publishedToShading: this.mode === "shading",
230
+ request: this.request,
231
+ sunTowardLight: this.sunTowardLight,
232
+ frameSize: [context.width, context.height],
233
+ camera: camera
234
+ ? { view: Array.from(camera.viewMatrix), projection: Array.from(camera.projectionMatrix), viewProjection: Array.from(camera.viewProjectionMatrix), near: camera.near, far: camera.far }
235
+ : null,
236
+ casterCount: this.casterCount
237
+ };
238
+ }
239
+ }
240
+ /** Records that the scene asked for the mask but this frame cannot produce one, and says so once. */
241
+ function recordUnavailable(ctx, reason, detail) {
242
+ latestContactDevice = ctx.device;
243
+ latestContactDiagnostics = { contactShadows: { passExecuted: false, depthSource: "none", unavailable: reason } };
244
+ warnOnce(detail);
115
245
  }
116
246
  export function createPrd02ContactShadowsContributor() {
117
247
  prd02DepthFeatures();
@@ -119,14 +249,35 @@ export function createPrd02ContactShadowsContributor() {
119
249
  id: "prd02.contactShadows",
120
250
  owner: "prd02",
121
251
  flag: "A3D_QR_LIGHTING",
122
- phases: ["after-opaque"],
252
+ // Feeding shading runs in `shadows`, before the forward pass is queued, so the mask exists when forward
253
+ // shading samples it (u_contactShadowMask). The tier-default path keeps its pre-WP-4 `after-opaque` slot.
254
+ phases: ["shadows", "after-opaque"],
123
255
  passes: (phase, ctx) => {
256
+ const request = contactShadowRequest(ctx);
257
+ const feedsShading = contactShadowOptIn(ctx) !== null || ctx.flags.on(CONTACT_SHADOWS_SUB_FLAG);
258
+ if (phase === "shadows") {
259
+ // A frame that does not build a mask clears the previous one; the shading branch publishes in execute()
260
+ // and leaves the previous frame's mask and draw counters in place until then, so it can check them.
261
+ if (!request || !ctx.camera || !feedsShading) {
262
+ setContactShadowMask(ctx.device, undefined);
263
+ return [];
264
+ }
265
+ // The mask is marched along the shadow-casting sun and only that light's visibility samples it. With no
266
+ // such light there is no direction to march and no consumer, so do not guess one.
267
+ const { sunDirection } = collectShadowSystemLights(ctx);
268
+ if (!sunDirection) {
269
+ setContactShadowMask(ctx.device, undefined);
270
+ recordUnavailable(ctx, CONTACT_SHADOWS_NO_SUN_REASON, "effects.contactShadows() has no visible effect: the scene has no shadow-casting directional light. The mask darkens the sun's light only; add a directional light with shadow: true.");
271
+ return [];
272
+ }
273
+ return [new Prd02ContactShadowsRenderPass(ctx, request, "shading", sunDirection)];
274
+ }
124
275
  if (phase !== "after-opaque")
125
276
  return [];
126
- const request = contactShadowRequest(ctx);
127
- if (!request || !ctx.camera)
277
+ if (!request || !ctx.camera || feedsShading)
128
278
  return [];
129
- return [new Prd02ContactShadowsRenderPass(ctx, request)];
279
+ const { sunDirection } = collectShadowSystemLights(ctx);
280
+ return [new Prd02ContactShadowsRenderPass(ctx, request, "tier-default", sunDirection)];
130
281
  }
131
282
  };
132
283
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Prd02ContactShadowsContributor.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/passes/Prd02ContactShadowsContributor.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,gEAAgE;AAChE,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,kEAAkE;AAElE,OAAO,EAAE,cAAc,EAA0B,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAA6B,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAChH,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC9J,OAAO,EAAE,2BAA2B,EAAsB,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3F,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAMzD,IAAI,wBAAwB,GAA8B;IACxD,cAAc,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE;CAC7D,CAAC;AAEF,uFAAuF;AACvF,MAAM,UAAU,6BAA6B;IAC3C,OAAO,wBAAwB,CAAC;AAClC,CAAC;AAED;+EAC+E;AAC/E,SAAS,UAAU,CAAC,GAA4B;IAC9C,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAyC,EAAE,CAAC;QACrG,IAAI,QAAQ,KAAK,GAAG,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;IACz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,IAAI,CAAC,GAAG,CAAC,MAAM;gBAAE,OAAO,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,6BAA6B,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;QAC3D,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"Prd02ContactShadowsContributor.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/passes/Prd02ContactShadowsContributor.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,uEAAuE;AACvE,wEAAwE;AACxE,iFAAiF;AACjF,6EAA6E;AAC7E,mEAAmE;AACnE,sDAAsD;AACtD,EAAE;AACF,sCAAsC;AACtC,iHAAiH;AACjH,8GAA8G;AAC9G,+GAA+G;AAC/G,kDAAkD;AAClD,+GAA+G;AAC/G,kFAAkF;AAElF,OAAO,EAAE,cAAc,EAA0B,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAA0D,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAC7I,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC3H,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC9J,OAAO,EAAE,2BAA2B,EAAsB,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3F,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAgBzD,IAAI,wBAAwB,GAA8B;IACxD,cAAc,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAA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,CAGvE;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAIrE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,gBAAgB,EACtB,GAAG,EAAE,YAAY,EACjB,QAAQ,EAAE,mBAAmB,EAC7B,SAAS,EAAE,YAAY,GAAG,SAAS;AACnC,qFAAqF;AACrF,YAAY,CAAC,EAAE,mBAAmB,GACjC,IAAI,CAqJN;AAsBD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAElF;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAEvJ"}
@@ -592,6 +592,8 @@ frameContext, options) {
592
592
  const ao = pipeline.ao;
593
593
  const directions = ao.directions ?? 4;
594
594
  const steps = ao.steps ?? 4;
595
+ // Audit (ssao:normals): S2 is the SSAO the v2 chain executes; record it so diagnostics().post.stagesRan shows it.
596
+ recordPostStage(`S2:gtao-${directions}x${steps}`);
595
597
  const aoRaw = state.pool.acquire({ width: hw, height: hh, format: "rgba8", samples: 1, depth: false });
596
598
  const gtaoSrc = withDefines(GTAO_GLSL, { AURA_GTAO_DIRECTIONS: directions, AURA_GTAO_STEPS: steps });
597
599
  const gtaoProg = program(state, gl, `gtao-${directions}x${steps}`, gtaoSrc);