Filtering Questions

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
MasonFace
Posts: 543
Joined: Tue Nov 27, 2018 7:28 pm
Location: Tennessee, USA
Contact:

Filtering Questions

Post by MasonFace »

I've got a few questions about the graphics filters in DFU:
  1. Would it be possible to separate the main filter into "Texture Filter" and "Sprite Filter"? I would agree that there is a slippery slope where the more options we give a layman the more confusion it could cause, but I think this could be very useful in the case of upscaled graphics where textures seem to look fine with the filtering, but sprites at the same resolution tend to look quite blurry with filtering unless the resolution is extremely high.
  2. Is it possible to customize the bilinear/trilinear filter kernal window radius? I'm thinking that reducing this radius could help soften the pixelation on sprites, but perhaps not wash out the details as badly. I'm assuming the bilinear and trilinear options use Unity's built-in filtering and I've never seen any way to configure it so I'm guessing the answer is "no," but I figured I'd ask just in case.
  3. Lastly, is there any reason to offer trilinear filtering for GUI? Since UI elements don't have mipmaps, is there any use for trilinear filtering? I'm asking this from memory, and I'm not at my personal PC at the moment to look so if this has been removed already, I apologize.
Thanks!

User avatar
MasonFace
Posts: 543
Joined: Tue Nov 27, 2018 7:28 pm
Location: Tennessee, USA
Contact:

Re: Filtering Questions

Post by MasonFace »

Nevermind about item 1. The sprites look worse with point filtering on than with bilinear or trilinear.

User avatar
Interkarma
Posts: 7242
Joined: Sun Mar 22, 2015 1:51 am

Re: Filtering Questions

Post by Interkarma »

I play with point filtering everywhere and I think it looks great! But I like me some crunchy pixels. :)

If you're finding sprites to be inordinately blurry, check the game quality is high enough (e.g. Beautiful or Fantastic). Lower quality levels switch to lower mipmap levels sooner and can make the sprites lose their pixely charm. If you're talking about upscaled sprites particularly, then higher resolution and some filtering is a must so they can look their best.

The filtering used is what's exposed by Unity as part of its rendering pipeline. No way to configure the kernel that I'm aware of. I'm pretty sure it's just a thin layer over whatever filtering the actual hardware is doing.

The filter setting binding is based on FilterMode in Unity API, which has members Point, Bilinear, Trilinear.

User avatar
MasonFace
Posts: 543
Joined: Tue Nov 27, 2018 7:28 pm
Location: Tennessee, USA
Contact:

Re: Filtering Questions

Post by MasonFace »

I think I may renege my previous statement about disregarding item 1. I still believe there is some utility in keeping these filter modes separate for textures and sprites if possible, but this is of course not critical.

Also, any thoughts on item 3? Not that it's important, really just a curiosity of mine.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Filtering Questions

Post by King of Worms »

MasonFace wrote: Mon Apr 08, 2019 2:18 pm I still believe there is some utility in keeping these filter modes separate for textures and sprites if possible...
I think the same ;) Most of the 3d game remakes (Doom, heretic, hexen, duke 3d) with sprites have this option for a good reason IMHO

User avatar
MrFlibble
Posts: 411
Joined: Sat Jan 27, 2018 10:43 am

Re: Filtering Questions

Post by MrFlibble »

Would it be possible to add xBR filtering as an option? I think it would look rather nicely at least on UI elements for retro rendering mode:
Image
Image
For the above images, I used xBR scaling from Image Analyser, it seems to produce better results than xBRZ Scaler Test.

Post Reply