From f7f1844adb893ffc1b68b57dfbed67391d79f1a1 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Wed, 22 Sep 2021 18:04:34 -0400 Subject: [PATCH] dec pixel size --- game/assets/shaders/pixelart.fs | 2 +- game/src/lib.rs | 2 +- game/src/shaders/shader.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/game/assets/shaders/pixelart.fs b/game/assets/shaders/pixelart.fs index 801cd84..371d8c8 100644 --- a/game/assets/shaders/pixelart.fs +++ b/game/assets/shaders/pixelart.fs @@ -13,7 +13,7 @@ uniform vec2 viewport; out vec4 finalColor; // Pixel scaling -const vec2 pixelScale = vec2(2.0, 2.0); +const vec2 pixelScale = vec2(1.0, 1.0); void main() { diff --git a/game/src/lib.rs b/game/src/lib.rs index afa4998..9dae3ea 100644 --- a/game/src/lib.rs +++ b/game/src/lib.rs @@ -62,7 +62,7 @@ pub async fn game_begin() { let (mut rl, thread) = raylib::init() .size(640, 480) .title(&game_config.name) - // .vsync() + .vsync() .msaa_4x() .resizable() .build(); diff --git a/game/src/shaders/shader.rs b/game/src/shaders/shader.rs index 5fbd21b..2f90d98 100644 --- a/game/src/shaders/shader.rs +++ b/game/src/shaders/shader.rs @@ -114,6 +114,7 @@ impl ShaderWrapper { where S: ShaderV, { + puffin::profile_function!(); if let Some(ptr) = self.variables.get(name) { self.shader.set_shader_value(*ptr, value); Ok(())