diff --git a/assets/data/scripts/pixel.hx b/assets/data/scripts/pixel.hx index 99a00834..eb47cb24 100644 --- a/assets/data/scripts/pixel.hx +++ b/assets/data/scripts/pixel.hx @@ -7,6 +7,7 @@ public var enableCameraHacks = true; public var enablePauseMenu = true; public var isSpooky = false; +var oldStageQuality = FlxG.game.stage.quality; static var daPixelZoom = 6; /** @@ -81,7 +82,7 @@ function createPost() { if (enableCameraHacks) { FlxG.camera.antialiasing = false; FlxG.camera.pixelPerfectRender = true; - FlxG.game.stage.quality = 2; + iconP1.antialiasing = false; iconP2.antialiasing = false; @@ -123,6 +124,13 @@ public function makeCameraPixely(cam) { pixellyCameras.push(cam); pixellyShaders.push(shad); + + FlxG.game.stage.quality = 2; +} + +function destroy() { + // resets the stage quality + FlxG.game.stage.quality = oldStageQuality; } function pixelCam(cam) { diff --git a/assets/shaders/pixelZoomShader.frag b/assets/shaders/pixelZoomShader.frag index a3e4d71e..17635ebf 100644 --- a/assets/shaders/pixelZoomShader.frag +++ b/assets/shaders/pixelZoomShader.frag @@ -3,7 +3,7 @@ uniform float pixelZoom; // zooms the game 6 times void main() { - vec2 camPos = getCamPos(floor(openfl_TextureCoordv * openfl_TextureSize) / openfl_TextureSize); + vec2 camPos = getCamPos(openfl_TextureCoordv); camPos = vec2(0.5, 0.5) + ((camPos - vec2(0.5, 0.5)) * pixelZoom); diff --git a/buildnumber.txt b/buildnumber.txt index f0acbc2e..03ce6dfa 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1251 \ No newline at end of file +1252 \ No newline at end of file diff --git a/source/funkin/options/Options.hx b/source/funkin/options/Options.hx index 32c58fda..f67f479a 100644 --- a/source/funkin/options/Options.hx +++ b/source/funkin/options/Options.hx @@ -156,7 +156,7 @@ class Options if (!__eventAdded) { Lib.application.onExit.add(function(i:Int) { - trace("saving settings..."); + trace("Saving settings..."); save(); }); __eventAdded = true; @@ -166,7 +166,7 @@ class Options public static function applySettings() { PlayerSettings.player1.setKeyboardScheme(Solo); - FlxG.game.stage.quality = (FlxG.forceNoAntialiasing = !antialiasing) ? 2 : 0; + FlxG.game.stage.quality = (FlxG.forceNoAntialiasing = !antialiasing) ? LOW : BEST; FlxG.autoPause = autoPause; FlxG.sound.volume = volume; }