This commit is contained in:
2026-10-26 22:50:05 +00:00
parent e0a0c687e7
commit 2da106cf0c
9 changed files with 26 additions and 25 deletions
@@ -385,9 +385,9 @@ impl TapeAllocator {
sample_count: 1,
view_formats: &[TextureFormat::R32Float],
size: Extent3d {
width: tape.subdivision,
height: tape.subdivision,
depth_or_array_layers: tape.subdivision,
width: tape.subdivision * 4,
height: tape.subdivision * 4,
depth_or_array_layers: tape.subdivision * 4,
},
});
let texture_view = texture.create_view(&TextureViewDescriptor {
@@ -76,8 +76,8 @@ fn main(compute_input: ComputeInput) {
let internal_pos = vec3f(compute_input.global_invocation_id);
let mid_point =
(((internal_pos + 0.5f) / f32(1 << metadata.subdivision_log2)) * metadata.dimensions)
+ metadata.lowest_corner;
(((internal_pos + 0.5f) / f32(4 << metadata.subdivision_log2)) * metadata.dimensions * 1.2)
+ metadata.lowest_corner - 0.1;
let point = scene(vec4(mid_point, metadata.time));
+1 -1
View File
@@ -1,7 +1,7 @@
import package::render::metadata_types::TapeMetadata;
import package::render::spatial_implicit::spatial_scene;
const EPSILON = .0001;
const EPSILON = .001;
fn get_normal(metadata: TapeMetadata, spatial_texture: u32, p: vec3<f32>) -> vec3<f32> {
let n = vec3(
@@ -5,6 +5,6 @@ import package::render::metadata_types::TapeMetadata;
@group(0) @binding(5) var spatial_texture_sampler: sampler;
fn spatial_scene(metadata: TapeMetadata, spatial_texture: u32, p: vec4<f32>) -> f32 {
let actual = (p.xyz - metadata.lowest_corner) / metadata.dimensions;
let actual = ((p.xyz - metadata.lowest_corner + 0.1) / metadata.dimensions) / 1.2;
return textureSampleLevel(spatial_textures[spatial_texture], spatial_texture_sampler, actual, 0.0).x;
}
+1 -1
View File
@@ -43,7 +43,7 @@ fn trace_tape(metadata: TapeMetadata, spatial_texture: u32, primitive_id: u32, r
let near_plane = near_far.x;
let far_plane = near_far.y;
if (true) { // SPEC_BOUNDING_BOXES
if (false) { // SPEC_BOUNDING_BOXES
return near_plane;
}