1
$\begingroup$

Assume I have a texture with a repeating line pattern. The lines are exactly 2 texels wide (really thin). Ans very spaced out (50 texels in between each line).

I am now struggling with the minification issue. The goal is to have as many of these lines to show up when rendering them in a textured map plane.

Using OpenGL's standard mipmaping is not good enough, most of the lines are blurred out of existence, especially when the lines have certain orientations with the screen.

Assuming the lines are white and the background is black. A slightly better technique is to, in addidition to mipmapping and anisotropic filtering, multisample a disk around the uv coordinate and look for white texels. If the result is white we discard the previous sample in favour of the white texels we just got.

The above gives slightly better results, but it's not perfect.

I have tried looking for papers and resources, but all I get on how to deal with this issue is "minification and anisotropic filtering" which I am already doing.

How to preserved thin/small details in a texture?

(I can't show the images displaying the problem)

$\endgroup$
  • 2
    $\begingroup$ You can't cheat the sampling theorem unfortunately. $\endgroup$ – lightxbulb Mar 20 at 23:48
  • $\begingroup$ If you can integrate it analytically on the other hand, then your issue is solved at the price of perf. $\endgroup$ – lightxbulb Mar 20 at 23:57
  • 1
    $\begingroup$ Your statement "A slightly better technique is to, in addidition to mipmapping and anisotropic filtering, multisample a disk around the uv coordinate and look for white texels. If the result is white we discard the previous sample in favour of the white texels we just got." is curious. Are you taking gamma into account? You can't correctly average black & white in sRGB space as "128" is not "half as bright". That, IIRC, is actually around 186 in sRGB. You thus really need to do your filtering in linear colour space. $\endgroup$ – Simon F Mar 21 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.