Keep wipeout frames continuous

This commit is contained in:
ramox81 committed 2026-09-11 17:27:34 +03:00
1 parent 21a232ef8d
commit 61e5271055
6 files changed
+19 -10

No files matched your search

+2 -1
View File
@@ -104,6 +104,7 @@ struct VertexOut {
fn resolve_hw(taper: f32, world_hw: f32, px_hw: f32) -> f32 {
if taper >= 0.0 { return max(taper / u.world_per_pixel, 0.5); }
if world_hw > 0.0 { return max(world_hw / u.world_per_pixel, 0.5); }
if world_hw < 0.0 { return max(-world_hw, 0.5); }
var display_hw = max(px_hw * u.lineweight_scale, 0.5);
if u.lineweight_scale < 0.0 {
let scale = -u.lineweight_scale;
@@ -227,7 +228,7 @@ fn marker_relative(position_high: vec3<f32>, position_low: vec3<f32>, instance:
let clip_pos = mix(clip_a, clip_b, which_end);
let hw = resolve_hw(0.0, 0.0, in.dists.z);
let hw = resolve_hw(-1.0, in.misc.w, in.dists.z);
let ext = which_end * 2.0 - 1.0;
let offset_px = perp * hw * side + dir * hw * ext;
let ndc_offset = offset_px / (u.viewport_size * 0.5);
+2 -1
View File
@@ -83,6 +83,7 @@ fn resolve_hw(taper_ratio: f32, world_hw: f32, px_hw: f32) -> f32 {
return max((taper_ratio * world_hw) / u.world_per_pixel, 0.5);
}
if world_hw > 0.0 { return max(world_hw / u.world_per_pixel, 0.5); }
if world_hw < 0.0 { return max(-world_hw, 0.5); }
var display_hw = max(px_hw * u.lineweight_scale, 0.5);
if u.lineweight_scale < 0.0 {
let scale = -u.lineweight_scale;
@@ -200,7 +201,7 @@ fn marker_relative(position_high: vec3<f32>, position_low: vec3<f32>, c: WireCon
let clip_pos = mix(clip_a, clip_b, which_end);
let hw = resolve_hw(0.0, 0.0, c.half_width);
let hw = resolve_hw(0.0, c.world_half_width, c.half_width);
let ext = which_end * 2.0 - 1.0;
let offset_px = perp * hw * side + dir * hw * ext;
let ndc_offset = offset_px / (u.viewport_size * 0.5);