Skip to content

Commit 65459b6

Browse files
committed
text alpha change
1 parent b187f5b commit 65459b6

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/pipeline.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,11 +631,7 @@ impl Cache {
631631
staging_belt: &mut wgpu::util::StagingBelt,
632632
encoder: &mut wgpu::CommandEncoder,
633633
) -> Result<&GlyphPosInfo, piet::Error> {
634-
let scale = if self.scale == 1.0 {
635-
1.0
636-
} else {
637-
self.scale * 2.0
638-
};
634+
let scale = self.scale;
639635

640636
let font_size = (font_size as f64 * scale).round() as u32;
641637
let glyph = self.get_glyph_info(c, font_family.clone(), font_weight, font_size)?;

src/shader/geometry.wgsl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,6 @@ fn fs_main(input: VertexOutput) -> [[location(0)]] vec4<f32> {
124124
if (alpha <= 0.0) {
125125
discard;
126126
}
127-
if (alpha <= 1.0) {
128-
if (alpha <= 0.0031308) {
129-
alpha = alpha * 12.92;
130-
} else {
131-
alpha = pow(alpha, 1.0 / 2.0) * 1.055 - 0.055;
132-
}
133-
if (alpha > 1.0) {
134-
alpha = 1.0;
135-
}
136-
}
137127
color.w = color.w * alpha;
138128
}
139129

0 commit comments

Comments
 (0)