Skip to content

Commit

Permalink
skymod: fix seam more aggressively
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghugo committed Jun 10, 2024
1 parent a0f351a commit a245843
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/skymod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl SkyModBuilder {

// fix the seam, i guess?
// zoom everything in so that the original size is 1 pixel outward diagonally for every corner
let what: f64 = -1. / MIN_TEXTURE_SIZE as f64;
let what: f64 = -2. / MIN_TEXTURE_SIZE as f64;

let vert_a_uv = array![0. - what, 0. - what].dot(&rot_mat);
let vert_b_uv = array![0. - what, 1. + what].dot(&rot_mat);
Expand Down Expand Up @@ -607,8 +607,8 @@ fn rotate_matrix_by_index_relative_to_down(
}
}

#[cfg(test)]
mod test {
#[allow(unused_imports)]
use super::*;

#[test]
Expand Down Expand Up @@ -652,8 +652,8 @@ mod test {
"/home/khang/.local/share/wineprefixes/wine32/".to_owned(),
))
.output_name("gchimp_lets_go")
.skybox_size(2_u32.pow(17))
.texture_per_face(1)
.skybox_size(512)
.texture_per_face(16)
.convert_texture(true);

let res = builder.work();
Expand Down

0 comments on commit a245843

Please sign in to comment.