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
@@ -5,7 +5,7 @@ struct Uniforms {
|
||||
flat_shade: f32,
|
||||
transparency_enable: f32,
|
||||
linetype_scale: f32,
|
||||
_pad: f32,
|
||||
lineweight_scale: f32,
|
||||
view_rot: mat4x4<f32>,
|
||||
eye_high: vec3<f32>,
|
||||
_pad_eh: f32,
|
||||
@@ -67,7 +67,7 @@ fn resolve_hw(taper_ratio: f32, world_hw: f32, px_hw: f32) -> f32 {
|
||||
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(
|
||||
|
||||
Reference in new issue
Block a user