Jump to content

Sprite Blurred with Anchor set at 0.5 and odd size


PapyElGringo
 Share

Recommended Posts

Hello !

 

I have a problem similar to http://www.html5gamedevs.com/topic/2244-sprites-of-odd-dimensions-blurred-when-flipped/

 

But im not using Phaser so I don't achieve to resolve my problem.

 

Im working with Pixel Art sprites, and when I want to set the position of an odd width or height with the anchor set at 0.5 the result is blurred because the renderer try to interpolate the pixel.

 

What is the solutions in PIXI to resolve this?

 

Im sorry if my english is hard to read and/or understand.

 

Kind regards of a French Developer who start with Pixi.js

 

Link to comment
Share on other sites

After some research I found that the option roundPixels is the answer of my problem but I don't find how to enable it...

 

Any ideas?

 

EDIT:

 

I found how to enable it and It's WORK !

this.renderer = new PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight,renderOptions);this.renderer.renderSession.roundPixels = true;
Edited by PapyElGringo
Link to comment
Share on other sites

  • 4 months later...

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...