This commit is contained in:
Spencer Killen 2023-12-31 08:46:20 -07:00
parent 912635a823
commit 6e0fb26f36
Signed by: sjkillen
GPG Key ID: 3AF3117BA6FBB75B
3 changed files with 8 additions and 16 deletions

View File

@ -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)

View File

@ -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;

View File

@ -9,7 +9,7 @@ use openexr::core::channel_list::Channel;
use openexr::core::frame_buffer::{FrameBuffer, Slice}; use openexr::core::frame_buffer::{FrameBuffer, Slice};
use openexr::core::header::Header; use openexr::core::header::Header;
use openexr::core::output_file::OutputFile; use openexr::core::output_file::OutputFile;
use openexr::core::PixelType; use openexr::core::{PixelType, Compression};
use pointcache::{MDDFrame, MDDSeekableFile, Point, PointCache}; use pointcache::{MDDFrame, MDDSeekableFile, Point, PointCache};
use std::{error::Error, fs::File}; use std::{error::Error, fs::File};
@ -17,7 +17,7 @@ use std::{error::Error, fs::File};
pub const MAX_IMAGE_DIM: usize = 16384; pub const MAX_IMAGE_DIM: usize = 16384;
// TODO lower this once you figure out what the fuck // 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 { fn non_color_channel() -> Channel {
Channel { Channel {
@ -40,6 +40,9 @@ fn write_mask_image(
assert!(height <= MAX_IMAGE_DIM); assert!(height <= MAX_IMAGE_DIM);
let mut header = Header::from_dimensions(width as i32, height as i32); 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("R", &non_color_channel());
let mut frame_buffer = FrameBuffer::new(); let mut frame_buffer = FrameBuffer::new();
@ -70,6 +73,9 @@ fn write_point_image(
) -> Result<(), Box<dyn Error>> { ) -> Result<(), Box<dyn Error>> {
let mut header = Header::from_dimensions(width as i32, height as i32); 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("R", &non_color_channel());
header.channels_mut().insert("G", &non_color_channel()); header.channels_mut().insert("G", &non_color_channel());
header.channels_mut().insert("B", &non_color_channel()); header.channels_mut().insert("B", &non_color_channel());