4 Commits

Author SHA1 Message Date
4a2cdac65c copy graphical data 2026-03-26 14:10:21 -07:00
1e3c01e419 sigmoid 2026-03-26 13:48:43 -07:00
27b02025e7 png 2026-03-26 13:29:59 -07:00
9c455141cf png 2026-03-26 13:24:08 -07:00

View File

@@ -104,9 +104,6 @@ fn training() {
.unwrap();
let timelines =
strafesnet_roblox_bot_file::v0::read_all_to_block(std::io::Cursor::new(bot_file)).unwrap();
let bot = strafesnet_roblox_bot_player::bot::CompleteBot::new(timelines).unwrap();
let world_offset = bot.world_offset();
let timelines = bot.timelines();
// setup graphics
let desc = wgpu::InstanceDescriptor::new_without_display_handle_from_env();
@@ -255,9 +252,6 @@ fn training() {
fn a(a: v0::Vector3) -> [f32; 2] {
[a.y, a.x]
}
fn add<T: core::ops::Add>(lhs: T, rhs: T) -> T::Output {
lhs + rhs
}
let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("wgpu encoder"),
@@ -267,7 +261,7 @@ fn training() {
graphics.encode_commands(
&mut encoder,
&graphics_texture_view,
add(world_offset, p(output_event.event.position).into()),
p(output_event.event.position).into(),
a(output_event.event.angles).into(),
);
@@ -285,7 +279,7 @@ fn training() {
offset: 0,
// This needs to be a multiple of 256.
bytes_per_row: Some(stride_size as u32),
rows_per_image: None,
rows_per_image: Some(size.y),
},
},
wgpu::Extent3d {
@@ -328,7 +322,7 @@ fn training() {
&inputs[i * INPUT..(i + 1) * INPUT]
.iter()
.copied()
.map(|f| f as u8)
.map(|f| (f * 255.0) as u8)
.collect::<Vec<u8>>(),
(SIZE_X, SIZE_Y),
format!("depth_images/{i}.png").into(),