forked from 1b-agent/opencadstudio-upstream
fix(render): correct lineweight display scaling
Remove the global display boost and scale paper-space lineweights with the current sheet zoom across wire, block-wire, and hatch paths. Fixes #962
This commit is contained in:
1 parent
0f337db488
commit
edbc4d8ff8
7 files changed
+34
-24
No files matched your search
@@ -29,7 +29,7 @@ struct Uniforms {
|
||||
// every line opaque.
|
||||
transparency_enable: f32,
|
||||
linetype_scale: f32,
|
||||
_pad: f32,
|
||||
lineweight_scale: f32,
|
||||
// ── Relative-to-eye (double-single) ──────────────────────────────────
|
||||
// view_rot is the rotation-only view-projection; vertices subtract the eye
|
||||
// (eye_high + eye_low, two f32 emulating f64) before transforming, so the
|
||||
@@ -102,7 +102,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); }
|
||||
return select(0.5, px_hw, u.lwdisplay_enable > 0.5);
|
||||
return select(0.5, max(px_hw * u.lineweight_scale, 0.5), u.lwdisplay_enable > 0.5);
|
||||
}
|
||||
|
||||
fn marker_relative(position_high: vec3<f32>, position_low: vec3<f32>, instance: InstanceIn) -> vec3<f32> {
|
||||
|
||||
Reference in new issue
Block a user