From 6e0fb26f36388aea02dd0f6f56d888c98019c03b Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Sun, 31 Dec 2023 08:46:20 -0700 Subject: [PATCH] . --- tools/bundle/bundle.gd | 9 --------- tools/bundle/bundle.gdshaderinc | 5 ----- tools/src/main.rs | 10 ++++++++-- 3 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 tools/bundle/bundle.gd delete mode 100644 tools/bundle/bundle.gdshaderinc diff --git a/tools/bundle/bundle.gd b/tools/bundle/bundle.gd deleted file mode 100644 index 2907266..0000000 --- a/tools/bundle/bundle.gd +++ /dev/null @@ -1,9 +0,0 @@ -extends Resource -@export var basenames: PackedStringArray -@export var shader: ShaderInclude -@export var image_VA_Swallow1: Texture2D -@export var image_mask_VA_Swallow1: Texture2D - -func attach(mat: ShaderMaterial): - mat.set_shader_parameter('image_VA_Swallow1', image_VA_Swallow1) - mat.set_shader_parameter('image_mask_VA_Swallow1', image_mask_VA_Swallow1) diff --git a/tools/bundle/bundle.gdshaderinc b/tools/bundle/bundle.gdshaderinc deleted file mode 100644 index 66a348d..0000000 --- a/tools/bundle/bundle.gdshaderinc +++ /dev/null @@ -1,5 +0,0 @@ - -uniform sampler2D image_VA_Swallow1: repeat_disable; -uniform sampler2D image_mask_VA_Swallow1: repeat_disable; -uniform bool enabled_VA_Swallow1 = false; -uniform int start_time_VA_Swallow1; diff --git a/tools/src/main.rs b/tools/src/main.rs index 3dba448..805b338 100644 --- a/tools/src/main.rs +++ b/tools/src/main.rs @@ -9,7 +9,7 @@ use openexr::core::channel_list::Channel; use openexr::core::frame_buffer::{FrameBuffer, Slice}; use openexr::core::header::Header; use openexr::core::output_file::OutputFile; -use openexr::core::PixelType; +use openexr::core::{PixelType, Compression}; use pointcache::{MDDFrame, MDDSeekableFile, Point, PointCache}; use std::{error::Error, fs::File}; @@ -17,7 +17,7 @@ use std::{error::Error, fs::File}; pub const MAX_IMAGE_DIM: usize = 16384; // TODO lower this once you figure out what the fuck -pub const MOVEMENT_EPSILON: f32 = 1.0; +pub const MOVEMENT_EPSILON: f32 = 0.000000001; fn non_color_channel() -> Channel { Channel { @@ -40,6 +40,9 @@ fn write_mask_image( assert!(height <= MAX_IMAGE_DIM); let mut header = Header::from_dimensions(width as i32, height as i32); + // TODO this might just make the file bigger and not fix anything + header.set_compression(Compression::No); + header.channels_mut().insert("R", &non_color_channel()); let mut frame_buffer = FrameBuffer::new(); @@ -70,6 +73,9 @@ fn write_point_image( ) -> Result<(), Box> { let mut header = Header::from_dimensions(width as i32, height as i32); + // TODO this might just make the file bigger and not fix anything + header.set_compression(Compression::No); + header.channels_mut().insert("R", &non_color_channel()); header.channels_mut().insert("G", &non_color_channel()); header.channels_mut().insert("B", &non_color_channel());