Quantcast
Channel: Latest Questions by x4000
Viewing all articles
Browse latest Browse all 49

How to retain full quality on a rotated textured quad?

$
0
0

So, I'm rendering a textured quad via Graphics.DrawMesh, on an orthographic camera, for windows/mac standalone, in the latest unity 3 beta. All is well when there are no rotations, I have absolutely pixel-perfect crisp graphics.

However, when I rotate the textured quads, it quickly starts to look rather horrible in terms of quality. In SlimDX, running over top of the Direct3DX sprite extensions, it pretty much handled this for me -- there were some artifacts, but they were minor to the point of only being noticeable as the rotation angle changed.

On the Unity side, I've tried:

  1. Using Bilinear filtering for the Texture2Ds that are rotated (normally it is Point for maximum correctness/quality when not rotated), but that makes the entire texture look fuzzy, despite the fact that the edges look better.
  2. Trilinear, which does the same as Bilinear.
  3. Adjusting overall quality settings, including forcing on aniso, 8x multisampling (from 16x, that's the highest my card will go) -- and none of that has any effect whatsoever.

I've been all through the Unity documentation a gazillion times for this -- first for my game Tidalis back four or five months ago, and now for my other game AI War, which I'm now porting to Unity.

Surely there's something I'm just missing...?

SlimDX imageUnity 3D image

First Edit:

Here's the direct image I'm using as the texture on the textured quad, if anyone else wants to check out what is happening:

alt text

Second Edit:

Here's an image that it might be easier to see the general bilinear distortion on, because of better contrast:

alt text

This is the sort of quality drop I'm seeing, and I'm seeing it in your image, too:

alt text

See how that one starship, which has been rotated with bilnear filtering applied, looks all blurry while the non-rotated point-filtered sprites all look perfectly clear? That's the crux of the issue I'm running into here. Aside from the rotated starship looking pretty blurry in general, worst of all that pink border is incredibly blurry, which makes it stand out like a sore thumb near its un-rotated-point-based peers.

Certainly that can be bypassed by making everything bilinear filtered, but that looks pretty wretched, too. Here's an example of the quality differences in general between bilinear and non-bilinear for non-rotated sprites:

Nice and crisp, no bilinear filtering except on the rotated missiles:alt text

Unfortunately blurry, with bilinear filtering on everything:alt text

This is really quite a challenge!


Viewing all articles
Browse latest Browse all 49

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>