mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
Make the new screencaps preserve alpha properly by switching to
premultiplied alpha. See option 1 of https://stackoverflow.com/a/24380226 Upload the "new" screenshots (and lakeslice map)!
This commit is contained in:
parent
7f0cdace5a
commit
4cf133cc32
@ -81,9 +81,9 @@
|
||||
"compressed_size_bytes": 3719946
|
||||
},
|
||||
"data/input/krakow/screenshots/center.zip": {
|
||||
"checksum": "eea3d054bf64edab34deafa2268b6d3c",
|
||||
"uncompressed_size_bytes": 14344391,
|
||||
"compressed_size_bytes": 14317330
|
||||
"checksum": "707291f418a603387a84eada8affde1f",
|
||||
"uncompressed_size_bytes": 26818019,
|
||||
"compressed_size_bytes": 26812853
|
||||
},
|
||||
"data/input/krakow/service_roads.bin": {
|
||||
"checksum": "13e14676cf8538325c7f7898de0ca75b",
|
||||
@ -156,9 +156,9 @@
|
||||
"compressed_size_bytes": 772801
|
||||
},
|
||||
"data/input/london/screenshots/southbank.zip": {
|
||||
"checksum": "c0f0b0cefd780655f7c2b4c86e2bbaf8",
|
||||
"uncompressed_size_bytes": 3944957,
|
||||
"compressed_size_bytes": 3943894
|
||||
"checksum": "95a55d5884d98e370bcec24b2cb09fee",
|
||||
"uncompressed_size_bytes": 7142289,
|
||||
"compressed_size_bytes": 7141827
|
||||
},
|
||||
"data/input/london/service_roads.bin": {
|
||||
"checksum": "4f651a450d9d6b73618db015c34a03ad",
|
||||
@ -591,24 +591,24 @@
|
||||
"compressed_size_bytes": 6030275
|
||||
},
|
||||
"data/input/seattle/screenshots/downtown.zip": {
|
||||
"checksum": "ed7e98796784139dd70a9c6ce545c1e5",
|
||||
"uncompressed_size_bytes": 14883429,
|
||||
"compressed_size_bytes": 14836130
|
||||
"checksum": "81924737767e97a05fb3c4e97c3b849e",
|
||||
"uncompressed_size_bytes": 22145905,
|
||||
"compressed_size_bytes": 22137518
|
||||
},
|
||||
"data/input/seattle/screenshots/lakeslice.zip": {
|
||||
"checksum": "832813fd81d64f3628f889bc6c1b6a90",
|
||||
"uncompressed_size_bytes": 13643739,
|
||||
"compressed_size_bytes": 13613206
|
||||
"checksum": "ed4dcfa82f42678dbe7068cc0edf45d9",
|
||||
"uncompressed_size_bytes": 21551056,
|
||||
"compressed_size_bytes": 21544520
|
||||
},
|
||||
"data/input/seattle/screenshots/montlake.zip": {
|
||||
"checksum": "5af2a61366882c679de33a5a2cbdba32",
|
||||
"uncompressed_size_bytes": 2626137,
|
||||
"compressed_size_bytes": 2625499
|
||||
"checksum": "3f5d3dff62ae99e6e4756107af546a7b",
|
||||
"uncompressed_size_bytes": 4191607,
|
||||
"compressed_size_bytes": 4191330
|
||||
},
|
||||
"data/input/seattle/screenshots/udistrict.zip": {
|
||||
"checksum": "1c01f94b990ef1a89583e30938553697",
|
||||
"uncompressed_size_bytes": 6834429,
|
||||
"compressed_size_bytes": 6825879
|
||||
"checksum": "4a68bce56ecb899e01d8d615c203bff7",
|
||||
"uncompressed_size_bytes": 10229787,
|
||||
"compressed_size_bytes": 10226458
|
||||
},
|
||||
"data/input/seattle/service_roads.bin": {
|
||||
"checksum": "87362c2566507e58ab9e4d55005d27d2",
|
||||
@ -796,7 +796,7 @@
|
||||
"compressed_size_bytes": 112617851
|
||||
},
|
||||
"data/system/seattle/maps/lakeslice.bin": {
|
||||
"checksum": "9828a5cb22dad0934cf0ef5cd0b03b10",
|
||||
"checksum": "0c2b9ab222451f36b0fec315cc0b7cd7",
|
||||
"uncompressed_size_bytes": 24517681,
|
||||
"compressed_size_bytes": 8641217
|
||||
},
|
||||
|
@ -16,7 +16,7 @@ mkdir diff
|
||||
for file in `ls $before | grep -v full.png | grep -v combine.sh`; do
|
||||
# For whatever reason, the intersection annotation doesn't seem to
|
||||
# always match up between two captures.
|
||||
prefix=`echo $file | sed 's/_.*//' | sed 's/.png//'`;
|
||||
prefix=`echo $file | sed 's/_.*//' | sed 's/.png//' | sed 's/.gif//'`;
|
||||
|
||||
diff $before/${prefix}* $after/${prefix}*;
|
||||
if [ $? -eq 1 ]; then
|
||||
|
@ -13,5 +13,6 @@ in vec3 fs_texture_coord;
|
||||
out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
out_color = fs_color * texture(textures, fs_texture_coord);
|
||||
vec4 x = fs_color * texture(textures, fs_texture_coord);
|
||||
out_color = vec4(x.a * x.r, x.a * x.g, x.a * x.b, x.a);
|
||||
}
|
||||
|
@ -16,5 +16,6 @@ in vec3 fs_texture_coord;
|
||||
out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
out_color = fs_color * texture(textures, fs_texture_coord);
|
||||
vec4 x = fs_color * texture(textures, fs_texture_coord);
|
||||
out_color = vec4(x.a * x.r, x.a * x.g, x.a * x.b, x.a);
|
||||
}
|
||||
|
@ -81,10 +81,10 @@ pub fn setup(
|
||||
|
||||
gl.enable(glow::BLEND);
|
||||
gl.blend_func_separate(
|
||||
glow::SRC_ALPHA,
|
||||
glow::ONE_MINUS_SRC_ALPHA,
|
||||
glow::SRC_ALPHA,
|
||||
glow::ONE,
|
||||
glow::ONE_MINUS_SRC_ALPHA,
|
||||
glow::ONE_MINUS_DST_ALPHA,
|
||||
glow::ONE,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -114,10 +114,10 @@ pub fn setup(
|
||||
|
||||
gl.enable(glow::BLEND);
|
||||
gl.blend_func_separate(
|
||||
glow::SRC_ALPHA,
|
||||
glow::ONE_MINUS_SRC_ALPHA,
|
||||
glow::SRC_ALPHA,
|
||||
glow::ONE,
|
||||
glow::ONE_MINUS_SRC_ALPHA,
|
||||
glow::ONE_MINUS_DST_ALPHA,
|
||||
glow::ONE,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@ pub(crate) fn screenshot_everything<A: SharedAppState>(
|
||||
state.canvas.cam_zoom = zoom;
|
||||
std::fs::create_dir_all(dir_path)?;
|
||||
|
||||
// TODO Sometimes the very first image captured is of the debug mode used to launch this. Not
|
||||
// sure why, and it's not so reproducible.
|
||||
for tile_y in 0..num_tiles_y {
|
||||
for tile_x in 0..num_tiles_x {
|
||||
timer.next();
|
||||
|
Loading…
Reference in New Issue
Block a user