Jump to content

Pixi.js v4 does not remain sprite pixelated as it original is


Salc2
 Share

Recommended Posts

Hi all,

I know this issue maybe repeated and seems to be very common but I searched first and did not find anything concrete. 

I am doing some test and playing around with pixijs. I created an stage 320x180 and I am rendering an sprite of 27x27 in a autodetected renderer (WEBGL always is selected) I am in a macos retina resolution (devicepixerate 4) the problem is I can not achieve having the sprite pixelated even setting antialias false in the renderer. I tested the same without pixijs but native canvas 2d context using drawImage and I could get what I wanted using some hacks like after every drawImage set context.imagesmoothingenabled to false and I have CSS file to canvas image-rendering: pixelated. With those I am having exactly what I want, but of course I would like to obtain the same using pixijs and WEBGL. Is it possible? Disable at all antialias in a WEBGL context? How we can deal with this to render pixel arts properly?

example using native canvas 2d context drawImage

5aae999fb5312_ScreenShot2018-03-18at16_47_51.thumb.png.945a7e72476c4ea7ddeee4a14541a968.png

example using PixiJS webgl renderer

5aae99ed5eab3_ScreenShot2018-03-18at16_44_28.thumb.png.7b50e01bcaaf57844bbb6f1433da9b19.png

Cheers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...