(
device: &wgpu::Device,
label: &'static str,
)
| 416 | pub(super) const MESH_SDF_RES: u32 = 32; |
| 417 | |
| 418 | pub(super) fn create_mesh_sdf_texture( |
| 419 | device: &wgpu::Device, |
| 420 | label: &'static str, |
| 421 | ) -> (wgpu::Texture, wgpu::TextureView) { |
| 422 | let texture = device.create_texture(&wgpu::TextureDescriptor { |
| 423 | label: Some(label), |
| 424 | size: wgpu::Extent3d { |
| 425 | width: MESH_SDF_RES, |
| 426 | height: MESH_SDF_RES, |
| 427 | depth_or_array_layers: MESH_SDF_RES, |
| 428 | }, |
| 429 | mip_level_count: 1, |
| 430 | sample_count: 1, |
| 431 | dimension: wgpu::TextureDimension::D3, |
| 432 | format: wgpu::TextureFormat::R32Float, |
| 433 | usage: wgpu::TextureUsages::STORAGE_BINDING |
| 434 | | wgpu::TextureUsages::TEXTURE_BINDING |
| 435 | | wgpu::TextureUsages::COPY_SRC, |
| 436 | view_formats: &[], |
| 437 | }); |
| 438 | let view = texture.create_view(&wgpu::TextureViewDescriptor::default()); |
| 439 | (texture, view) |
| 440 | } |
| 441 | |
| 442 | /// Ticket 013 — Mesh Cards. Shared 2D atlases sampled by the HW probe |
| 443 | /// trace at hit. V2 stores 6 signed-axis slots per mesh (±X ±Y ±Z) |
no outgoing calls
no test coverage detected