Author Topic: Disabling DirectX 11 makes picture fuzzy  (Read 28844 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Disabling DirectX 11 makes picture fuzzy
« Reply #15 on: December 19, 2014, 07:41:12 AM »
As I mentioned in a previous post:
Pixel perfect means it corresponds to actual pixels on the screen 1:1. What you are trying to do is not pixel perfect by definition.
I'm going to assume that what you want is simply have 1 virtual pixel be a 2x2 on-screen pixel. This isn't pixel perfect, but I assume you simply got your terminology wrong. Open up UICamera.cs, find the drawCallOffset property on line 315:
  1. float mod = (1f / size.y) / mCam.orthographicSize;
You will want to change this to:
  1. float pixelSize = (root != null) ? root.pixelSizeAdjustment : 1f;
  2. float mod = (pixelSize / size.y) / mCam.orthographicSize;
« Last Edit: December 19, 2014, 07:53:33 AM by ArenMook »

soulburner

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 22
    • View Profile
Re: Disabling DirectX 11 makes picture fuzzy
« Reply #16 on: December 19, 2014, 09:00:52 AM »
Thank you. I'll try to.

Yes, I want my 1x1 pixel on the art to be exactly 2x2 pixel on the screen. And to have no sprite breaks.
Programmer at LazyBearGames.com
Making Punch Club and Graveyard Keeper

soulburner

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 22
    • View Profile
Re: Disabling DirectX 11 makes picture fuzzy
« Reply #17 on: December 20, 2014, 11:32:41 AM »
Thank you again! I've applied your code and atrefacts seem to be gone.

PS: the source code was UIPanel.cs, btw ;)
Programmer at LazyBearGames.com
Making Punch Club and Graveyard Keeper