Open poisonHornGames opened 8 months ago
I don't know of any, off-hand, We'd have to work with openfl/lime to make a new one
pixel perfect graphics work on the flash target
https://github.com/HaxeFlixel/flixel/assets/155884736/1842a50f-cddd-4fbe-bede-b1dde8a88657
i managed to make it work by changing with the hashlink target by changing line 702 in FlxG.hx "#if air" to "#if (air || desktop)" not sure if it's the correct solution but it works :)
i managed to make it work by changing with the hashlink target by changing line 702 in FlxG.hx "#if air" to "#if (air || desktop)" not sure if it's the correct solution but it works :)
blitting is likely gonna have much worse performance, I do think there's a better solution but I don't know when I'll have time to try it out
I tried re-creating the effect using shaders (in a fork I made) This is the shader I used:
private class PixelPerfectShader extends FlxShader
{
@:glFragmentSource('
#pragma header
uniform vec2 screenSize;
void main()
{
gl_FragColor = flixel_texture2D(bitmap, floor(openfl_TextureCoordv * screenSize)/screenSize);
}
')
public function new()
{
super();
screenSize.value = [ FlxG.width*2, FlxG.height*2 ];
}
}
Testing on Windows:
https://github.com/HaxeFlixel/flixel/assets/83609901/fc9314f6-5e36-4922-bf90-3d9fe8959be5
Adding the ShaderFilter to an FlxCamera's filters array should probably prevent the mouse pointer from getting pixelated too
the github gist hasn't worked for a while now, neither is there an official or easy way to do it