Edit: More info: The reduced texture uses precisely nearest-neighbor downsampling, as opposed to bicubic downsampling. Maybe that's not "anti-alias" at all? I don't know.
I think you're actually referring to texture filtering, not anti-aliasing. By default, textures use bilinear filtering. If you go into the texture layer (myMaterial.TextureMaterial[n], where n is the texture layer you want to access), you can set filtering options. You can set TrilinearFilter in the layer to true to activate trilinear filtering, or for even better filtering, set AnisotropicFilter to the amount of anisotropic filtering you want (usually powers of two, from 2 to 16).
slavik262 wrote:I think you're actually referring to texture filtering, not anti-aliasing. By default, textures use bilinear filtering. If you go into the texture layer (myMaterial.TextureMaterial[n], where n is the texture layer you want to access), you can set filtering options. You can set TrilinearFilter in the layer to true to activate trilinear filtering, or for even better filtering, set AnisotropicFilter to the amount of anisotropic filtering you want (usually powers of two, from 2 to 16).
Hope that helps
Do you mean myMaterial.textureLayer[]?
I do this:
irrmaterial.TextureLayer[0].TrilinearFilter = true;
... right before setting the texture. No difference.
I also tried adding:
irrmaterial.TextureLayer[0].AnisotropicFilter = 15;
No difference..
Also tried setting it at various points.. after setting the texture, before, much before, much after... no difference..
Last edited by agamemnus on Sat Sep 11, 2010 8:56 pm, edited 1 time in total.
of course you have also to enable the material flag. if anisotropic is x8 but the anisotropic filter flag is false you are not going to use the filters.
NVIDIA and ATI video cards make you able to choos if you want the anisotropic or antialias filter activated (indipendently of your application settings). so maybe you can also look if you video settings are:
Try also to see if a medium configuration work on your machine
(antialiasx 2 anisotropic x 8 )
and also run several demos that use those filters.
remember also to set the material to the mesh that you are using
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
* I also tried with: ".setFlag(irr::video::EMF_TRILINEAR_FILTER, 1);" and ".AntiAliasing = 15;", and there is no difference.
* I am not using a mesh; I am using drawIndexedTriangleList.
* Anti-aliasing is enabled system-wide. There is anti-alias between polygons.
* The driver had application-controlled on both anti-alias and ansiotropic filtering. Setting them both to 4x and forcing ansiotropic filtering to "quality with full trilinear" and then running my program did not make any difference.
Last edited by agamemnus on Sat Sep 11, 2010 9:05 pm, edited 1 time in total.
can you provide code that runs and shows the problem?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
and second why do use 1 instead of true?is true actually 1 everywhere? dunno
anyway.
next thing maybe you can show us the problem you have with a picture. maybe the result is actually correct?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
and second why do use 1 instead of true?is true actually 1 everywhere? dunno
anyway.
next thing maybe you can show us the problem you have with a picture. maybe the result is actually correct?
From Slavik's post, I thought it was something I was not doing -- that "irrmaterial.setFlag" and "irrmaterial.TextureLayer[0]" are different.
As I said, to use Photoshop terminology, the downsampling uses "nearest neighbor", instead of "bicubic". Here is the difference:
In my game let's say the image is reduced to 32x32. (The image I have linked is magnified 10x) The fish in my game looks like the fish on the left -- nearest neighbor. I want it to look like the fish on the right -- bicubic.
For texture filtering you don't need anti-aliasing. Simply set the filter modes of the material and render the objects. If you use 3d rendering (draw3D* or drawVertex*) you have to use setMaterial(). For the 2d elements use the 2dmaterial, which is a global override element.
Please refer to example 6 on usage of 2dmaterial.
I've just added a test case in the regressions, and example 6 also has texture filtering in 2d mode. Both work with all hw drivers. Moreover, the GUI problem is also not visible here, gui images still render with the 2d material.