|
233 | 233 | /// |
234 | 234 | /// This must only use the lower 24 bits, if any bits are outside that range (byte 4 does not equal 0) the TlasInstance becomes |
235 | 235 | /// invalid and generates a validation error when built |
236 | | - </span><span class="kw">pub </span>custom_index: u32, |
| 236 | + </span><span class="kw">pub </span>custom_data: u32, |
237 | 237 | <span class="doccomment">/// Mask for the instance used inside the shader to filter instances. |
238 | 238 | /// Reports hit only if `(shader_cull_mask & tlas_instance.mask) != 0u`. |
239 | 239 | </span><span class="kw">pub </span>mask: u8, |
|
243 | 243 | <span class="doccomment">/// Construct TlasInstance. |
244 | 244 | /// - blas: Reference to the bottom level acceleration structure |
245 | 245 | /// - transform: Transform buffer offset in bytes (optional, required if transform buffer is present) |
246 | | - /// - custom_index: Custom index for the instance used inside the shader (max 24 bits) |
| 246 | + /// - custom_data: Custom index for the instance used inside the shader (max 24 bits) |
247 | 247 | /// - mask: Mask for the instance used inside the shader to filter instances |
248 | 248 | /// |
249 | 249 | /// Note: while one of these contains a reference to a BLAS that BLAS will not be dropped, |
250 | 250 | /// but it can still be destroyed. Destroying a BLAS that is referenced by one or more |
251 | 251 | /// TlasInstance(s) will immediately make them invalid. If one or more of those invalid |
252 | 252 | /// TlasInstances is inside a TlasPackage that is attempted to be built, the build will |
253 | 253 | /// generate a validation error. |
254 | | - </span><span class="kw">pub fn </span>new(blas: <span class="kw-2">&</span>Blas, transform: [f32; <span class="number">12</span>], custom_index: u32, mask: u8) -> <span class="self">Self </span>{ |
| 254 | + </span><span class="kw">pub fn </span>new(blas: <span class="kw-2">&</span>Blas, transform: [f32; <span class="number">12</span>], custom_data: u32, mask: u8) -> <span class="self">Self </span>{ |
255 | 255 | <span class="self">Self </span>{ |
256 | 256 | blas: blas.inner.clone(), |
257 | 257 | transform, |
258 | | - custom_index, |
| 258 | + custom_data, |
259 | 259 | mask, |
260 | 260 | } |
261 | 261 | } |
|
0 commit comments