Page 1 of 1
Any way to get rid of bilinear filtering?
Posted: Fri Apr 26, 2019 10:53 pm
by AutogolazzoJr
This is literally the bane of any low-resolution-texture aficionado. Any way to turn it off?
https://i.imgur.com/b8UjOr1.png
Re: Any way to get rid of bilinear filtering?
Posted: Fri Apr 26, 2019 11:27 pm
by alpistinho
Not currently, bilinear is always used.
Dade wrote: Wed May 09, 2018 9:15 am
happysmash27 wrote: Wed May 09, 2018 3:23 am
I am trying to change the interpolation of an image texture to be nearest neighbour, with sharper, cleaner lines. However, I don't see an interpolation option. Is it currently possible to do this without manually making the texture larger?
Not at the moment, bilinear interpolation is always used. Indeed, it would be quite easy to add as an option but it has never be done until now.
Where is that located in the code?
PS: Dade, were you notified of this quote?
Re: Any way to get rid of bilinear filtering?
Posted: Sat Apr 27, 2019 1:27 am
by AutogolazzoJr
I've seen that post. I think no interpolation really needs to be added as an option. For now, the only way to get blocky pixels is to pre-scale the textures.
Re: Any way to get rid of bilinear filtering?
Posted: Sat Apr 27, 2019 12:43 pm
by Dade
alpistinho wrote: Fri Apr 26, 2019 11:27 pm
Where is that located in the code?
The code for image maps bi-linear interpolation is here:
https://github.com/LuxCoreRender/LuxCor ... p.cpp#L345
But, as usual, the hard part is not the C++ code but the OpenCL one.
Re: Any way to get rid of bilinear filtering?
Posted: Mon Jun 17, 2019 8:57 pm
by happysmash27
Can someone, perhaps, explain what, exactly, it is doing? I don't quite understand the inputs and outputs, and it doesn't help that I am more familiar with C than C++.
Re: Any way to get rid of bilinear filtering?
Posted: Mon Jun 17, 2019 9:18 pm
by B.Y.O.B.
It maps UV coordinates to 4 texels in the image texture and performs bilinear filtering on those 4 texels.
It returns the resulting color (basically a weighted mix between the 4 texels).
See
https://en.wikipedia.org/wiki/Bilinear_filtering
I think if you want to implement a method without bilinear filtering, you would just evaluate one texel at the UV location and return its color.