Fix bogus thin culling that was causing artefacts
This commit is contained in:
parent
d1ca5fe757
commit
ab93ea1f22
|
@ -50,8 +50,5 @@ void main() {
|
|||
vFrom = from - position;
|
||||
vTo = to - position;
|
||||
|
||||
if (!(abs(from.x - to.x) > 0.1) || !(abs(uTileSize.y - min(from.y, to.y)) > 0.1))
|
||||
gl_Position = vec4(0.0);
|
||||
else
|
||||
gl_Position = vec4((tileOrigin + position) / uFramebufferSize * 2.0 - 1.0, 0.0, 1.0);
|
||||
gl_Position = vec4((tileOrigin + position) / uFramebufferSize * 2.0 - 1.0, 0.0, 1.0);
|
||||
}
|
||||
|
|
|
@ -645,46 +645,6 @@ mod x86 {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// Two pairs of 32-bit floats
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct F64x2x2(pub __m128d);
|
||||
|
||||
impl F64x2 {
|
||||
// Shuffles
|
||||
|
||||
#[inline]
|
||||
pub fn interleave(self, other: F64x2) -> (F64x2, F64x2) {
|
||||
unsafe {
|
||||
(
|
||||
F64x2(x86_64::_mm_unpacklo_pd(self.0, other.0)),
|
||||
F64x2(x86_64::_mm_unpackhi_pd(self.0, other.0)),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Creates `<self[0], self[1], other[2], other[3]>`.
|
||||
#[inline]
|
||||
pub fn combine_low_high(self, other: F64x2) -> F64x2 {
|
||||
unsafe {
|
||||
F64x2(x86_64::_mm_shuffle_pd(self.0, other.0, 0b10))
|
||||
}
|
||||
}
|
||||
|
||||
// Casts these packed floats to 32-bit floats.
|
||||
//
|
||||
// NB: This is a pure bitcast and does no actual conversion; only use this if you know what
|
||||
// you're doing.
|
||||
#[inline]
|
||||
pub fn as_f32x4(self) -> F32x4 {
|
||||
unsafe {
|
||||
F32x4(x86_64::_mm_castpd_ps(self.0))
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// 32-bit signed integers
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
|
|
|
@ -136,19 +136,17 @@ impl BuiltObject {
|
|||
.shuffle(shuffle_mask.as_u8x16())
|
||||
.as_i32x4();
|
||||
|
||||
// Unpack whole and fractional pixels.
|
||||
let px = LineSegmentU4((segment[1] | (segment[1] >> 12)) as u16);
|
||||
let subpx = LineSegmentU8(segment[0] as u32);
|
||||
|
||||
let tile_index = self.tile_coords_to_index(tile_x, tile_y);
|
||||
|
||||
/*
|
||||
// TODO(pcwalton): Cull degenerate fills again.
|
||||
// Cull degenerate fills.
|
||||
let (from_px, to_px) = (from.to_u8(), to.to_u8());
|
||||
if from_px.x == to_px.x && from_subpx.x == to_subpx.x {
|
||||
return
|
||||
if (px.0 & 0xf) as u8 == ((px.0 >> 8) & 0xf) as u8 &&
|
||||
(subpx.0 & 0xff) as u8 == ((subpx.0 >> 16) & 0xff) as u8 {
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
let tile_index = self.tile_coords_to_index(tile_x, tile_y);
|
||||
|
||||
self.fills.push(FillObjectPrimitive {
|
||||
px,
|
||||
|
|
Loading…
Reference in New Issue