From ab5106e978c8c3d5cd2f97f4da1fb9e4275d7f61 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Mon, 29 Jun 2026 20:28:08 -0400 Subject: Update --- crates/renderer/src/assets.rs | 2 ++ crates/renderer/src/assets/shaders/handcam/frag.glsl | 12 ++++++++++++ crates/renderer/src/assets/shaders/handcam/vert.glsl | 4 ++++ crates/renderer/src/assets/textures/exclusive.png | Bin 0 -> 832 bytes crates/renderer/src/main.rs | 2 +- crates/renderer/src/overlay.rs | 3 ++- crates/renderer/src/overlay/clippy.rs | 3 +++ crates/renderer/src/overlay/tcg.rs | 10 ++++++++++ 8 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 crates/renderer/src/assets/shaders/handcam/frag.glsl create mode 100644 crates/renderer/src/assets/shaders/handcam/vert.glsl create mode 100644 crates/renderer/src/assets/textures/exclusive.png (limited to 'crates') diff --git a/crates/renderer/src/assets.rs b/crates/renderer/src/assets.rs index 4eb681a..042fc88 100644 --- a/crates/renderer/src/assets.rs +++ b/crates/renderer/src/assets.rs @@ -16,6 +16,7 @@ pub struct Assets { pub texture_operatop: texture::Texture, pub texture_operabottom: texture::Texture, pub texture_clippyborder: texture::Texture, + pub texture_exclusive: texture::Texture, } impl Assets { @@ -72,6 +73,7 @@ impl Assets { texture_operatop: texture::Texture::new(ctx, include_bytes!("assets/textures/operatop.png")), texture_operabottom: texture::Texture::new(ctx, include_bytes!("assets/textures/operabottom.png")), texture_clippyborder: texture::Texture::new(ctx, include_bytes!("assets/textures/clippyborder.png")), + texture_exclusive: texture::Texture::new(ctx, include_bytes!("assets/textures/exclusive.png")), } } } diff --git a/crates/renderer/src/assets/shaders/handcam/frag.glsl b/crates/renderer/src/assets/shaders/handcam/frag.glsl new file mode 100644 index 0000000..ea327e6 --- /dev/null +++ b/crates/renderer/src/assets/shaders/handcam/frag.glsl @@ -0,0 +1,12 @@ +uniform sampler2D texture_data; + +uniform vec2 crop; + +void main() +{ + vec2 tcfull = vec2(vertex_texcoord.x, 1.0 - vertex_texcoord.y); + if (tcfull.x > crop.x || tcfull.y > crop.y) discard; + vec4 texel = texture(texture_data, tcfull); + texel.a = 0.5; + frag_color = texel; +} diff --git a/crates/renderer/src/assets/shaders/handcam/vert.glsl b/crates/renderer/src/assets/shaders/handcam/vert.glsl new file mode 100644 index 0000000..e324f7e --- /dev/null +++ b/crates/renderer/src/assets/shaders/handcam/vert.glsl @@ -0,0 +1,4 @@ +void main() +{ + default_main(); +} \ No newline at end of file diff --git a/crates/renderer/src/assets/textures/exclusive.png b/crates/renderer/src/assets/textures/exclusive.png new file mode 100644 index 0000000..98aa306 Binary files /dev/null and b/crates/renderer/src/assets/textures/exclusive.png differ diff --git a/crates/renderer/src/main.rs b/crates/renderer/src/main.rs index d9ff83d..5f73df8 100644 --- a/crates/renderer/src/main.rs +++ b/crates/renderer/src/main.rs @@ -30,7 +30,7 @@ pub fn main() -> Erm<()> { Box::new(overlay::shader::Overlay::new(ctx)), Box::new(overlay::tcg::Overlay::new(ctx)), Box::new(overlay::clippy::Overlay::new(ctx)), - Box::new(overlay::handcam::Overlay::new(ctx)), + // Box::new(overlay::handcam::Overlay::new(ctx)), Box::new(overlay::combo::Overlay::new(ctx)), Box::new(overlay::drawing::Overlay::new(ctx)), Box::new(overlay::asset::Overlay::new(ctx)), diff --git a/crates/renderer/src/overlay.rs b/crates/renderer/src/overlay.rs index 7ccf1f5..ec8acb8 100644 --- a/crates/renderer/src/overlay.rs +++ b/crates/renderer/src/overlay.rs @@ -181,7 +181,8 @@ impl teleia::state::Game for Overlays { &glam::Vec3::new(0.0, 0.0, -1.0), &glam::Vec3::new(0.0, 1.0, 0.0), ); - while let Some(msg) = self.state.fig_binary.pump()? { + self.state.fig_binary.pump()?; + while let Some(msg) = self.state.fig_binary.pop_incoming_message() { for ov in self.overlays.iter_mut() { ov.handle_binary(ctx, st, &mut self.state, &msg)?; } diff --git a/crates/renderer/src/overlay/clippy.rs b/crates/renderer/src/overlay/clippy.rs index e1ddb0e..741f3bb 100644 --- a/crates/renderer/src/overlay/clippy.rs +++ b/crates/renderer/src/overlay/clippy.rs @@ -579,6 +579,9 @@ impl overlay::Overlay for Overlay { Ok(()) } fn render(&mut self, ctx: &context::Context, st: &mut state::State, ost: &mut overlay::State) -> Erm<()> { + if st.tick % 60 == 0 { + log::info!("drawing clippy"); + } st.bind_2d(ctx, &ost.assets.shader_acs); let w = 3.0 * self.acs.character_info.width as f32; let h = 3.0 * self.acs.character_info.height as f32; diff --git a/crates/renderer/src/overlay/tcg.rs b/crates/renderer/src/overlay/tcg.rs index 484f265..e6cc34a 100644 --- a/crates/renderer/src/overlay/tcg.rs +++ b/crates/renderer/src/overlay/tcg.rs @@ -448,6 +448,16 @@ impl CardRenderer { } ); + // exclusive mandarin + // st.bind_2d(ctx, &ost.assets.shader_flat); + // ost.assets.texture_exclusive.bind(ctx); + // ost.assets.shader_flat.set_position_2d( + // ctx, st, + // &glam::Vec2::new(0.0, 0.0), + // &glam::Vec2::new(WIDTH, 16.0) + // ); + // st.mesh_square.render(ctx); + // art self.draw_rectangle(ctx, st, ost, glam::Vec4::new(0.1, 0.1, 0.1, 1.0), -- cgit v1.2.3