filtering anisotropic point linear not working on d3d9/ATI
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
filtering anisotropic point linear not working on d3d9/ATI
Can anyone with an ATI card and windows verify this bug report, as I only have Nvidia.
The steps to reproduce are:
1) Install ogre demos (or use the repo samples)
2) edit Media/materials/scripts/Ogre.material
3) Find Ogre/Skin and add "filtering anisotropic point linear" without the quotes below the "texture GreenSkin.jpg" line
4) Run the Sample Browser, go to the Lighting demo, and move the camera really close to the ogre head
5) Check the texture is pixellated as it should be for point magnification filtering.
The fact it doesn't show in GL suggests it's Ogre rather than a driver bug, but can't be sure without a d3d9-level test case.
My users have seen this with trunk ogre and with the 1.7 version in the demos download on the site.
Thanks if anyone can try this.
The steps to reproduce are:
1) Install ogre demos (or use the repo samples)
2) edit Media/materials/scripts/Ogre.material
3) Find Ogre/Skin and add "filtering anisotropic point linear" without the quotes below the "texture GreenSkin.jpg" line
4) Run the Sample Browser, go to the Lighting demo, and move the camera really close to the ogre head
5) Check the texture is pixellated as it should be for point magnification filtering.
The fact it doesn't show in GL suggests it's Ogre rather than a driver bug, but can't be sure without a d3d9-level test case.
My users have seen this with trunk ogre and with the 1.7 version in the demos download on the site.
Thanks if anyone can try this.
-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
Downloading the demo, I'll try this right now.
-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
It don't seem to change at all.5) Check the texture is pixellated as it should be for point magnification filtering.
I took a screenshot in windowed mode:
I have a ATI Mobility Radeon HD 4670.
I add a copy of the Ogre.material file in case I did something wrong:
Code: Select all
material Ogre/Earring
{
technique
{
pass
{
ambient 0.7 0.7 0
diffuse 0.7 0.7 0
texture_unit
{
texture spheremap.png
colour_op_ex add src_texture src_current
colour_op_multipass_fallback one one
env_map spherical
}
}
}
}
material Ogre/Skin
{
technique
{
pass
{
ambient 0.3 0.8 0.3
texture_unit
{
texture GreenSkin.jpg
filtering anisotropic point linear
tex_address_mode mirror
}
}
}
}
material Ogre/Tusks
{
technique
{
pass
{
ambient 0.7 0.7 0.6
texture_unit
{
texture tusk.jpg
scale 0.2 0.2
}
}
}
}
material Ogre/Eyes
{
technique
{
pass
{
ambient 1 0.4 0.4
diffuse 1 0.7 0
emissive 0.3 0.1 0
}
}
}
You do not have the required permissions to view the files attached to this post.
-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
To see what you were talking about i had to test with OGL and go closer. I do see the pixelization, and indeed it don't work in d3d9. I didn't check with more recent Ogre version yet, will do tomorrow if you want.
D3D9: http://postimg.org/image/f4n7fqlaf/
OGL: http://postimg.org/image/phaqd6bsz/
D3D9: http://postimg.org/image/f4n7fqlaf/
OGL: http://postimg.org/image/phaqd6bsz/
-
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 535
Re: filtering anisotropic point linear not working on d3d9/A
I do see the problem in the 1.7 samples, but the 1.9 samples do it correctly in dx9.
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
Thanks for your help, looks like I'll just sync my trunk and this will go away 

-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
I had to fix this before I could compile the latest Ogre, but I can't work out how to submit it as a pull request...
https://bitbucket.org/sparkprime/grit_o ... 26b21f3c38
https://bitbucket.org/sparkprime/grit_o ... 26b21f3c38
-
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 535
Re: filtering anisotropic point linear not working on d3d9/A
That's odd. What compiler are you using? Was it linking errors while building ogre or linking with your code?
If you want the latest ogre, make sure you get the v1-9 branch. Don't get default or v2-0, they may not be in a usable state. (Our default branch may be lagged behind, all actual development work goes directly into v1-9 then is occasionally merged into default).
If you want the latest ogre, make sure you get the v1-9 branch. Don't get default or v2-0, they may not be in a usable state. (Our default branch may be lagged behind, all actual development work goes directly into v1-9 then is occasionally merged into default).
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
Ah OK 
This is gcc 4.6 with -O2 -finline-functions and above. (aside: I was using gcc 4.7 but it seems to have a problem compiling manual vertex animation code that causes segfaults so I dropped to 4.6)
I build static so the only linking is done in my app (and OgreXMLConverter).
After reading the code from this bug, it was clear the code was wrong, since implicit template instantiation is not required to generate a symbol in C++. My patch fixes it by making the instantiations explicit.

This is gcc 4.6 with -O2 -finline-functions and above. (aside: I was using gcc 4.7 but it seems to have a problem compiling manual vertex animation code that causes segfaults so I dropped to 4.6)
I build static so the only linking is done in my app (and OgreXMLConverter).
After reading the code from this bug, it was clear the code was wrong, since implicit template instantiation is not required to generate a symbol in C++. My patch fixes it by making the instantiations explicit.
Last edited by sparkprime on Tue Apr 23, 2013 2:19 pm, edited 2 times in total.
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
If I want to be using the D3D11 and Gl3 rendersystems at some point (perhaps soon), which branch do I want for that?
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
OK with the branch I updated to, the original reporter has said the bug is still present. I am going to rebuild with 1-9 and we'll try that.
However I also asked him to try the 1-9 demos from http://sourceforge.net/projects/ogre/fi ... e/download
He said the bug still occurs there.
Kojack: is that the download you used?
Can anyone else confirm or deny that 1.9 works correctly?
thanks
However I also asked him to try the 1-9 demos from http://sourceforge.net/projects/ogre/fi ... e/download
He said the bug still occurs there.
Kojack: is that the download you used?
Can anyone else confirm or deny that 1.9 works correctly?
thanks
-
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 535
Re: filtering anisotropic point linear not working on d3d9/A
That demos package is 7 months old, there's been a lot of bug fixes since then. I used the 1.9 rc1 sdks that just came out a few days ago.Kojack: is that the download you used?
Although I just downloaded that demos package, adding the filter line makes it correctly use point mode in dx9.
What hardware is the reporter using?
There are dx9 cap bits for each filtering mode. The point setting as the second parameter requires the D3DPTFILTERCAPS_MAGFPOINT to be true. You can check if it's supported by opening the directx caps viewer and going to Direct3D9 Devices / Your GFX card name / D3D Device Types / HAL / Caps / TextureFilterCaps.
It would be odd to not support point mode though, that would usually be the fallback mode. But it's a possibility I guess.
Also, is the reporter zooming in enough? The ogrehead isn't the best model to test because the pixels have little variation in colour and are tiny, you have to get in really close to see the pixelation.
-
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 535
Re: filtering anisotropic point linear not working on d3d9/A
Wait a sec, how did I miss the ATI thing in the title and first post? (probably because the following posts cut off the TI part). I'm on nvidia right now (my ati pc is in pieces).
But even so, I did see the bug in ogre 1.7, so at least back then it wasn't brand specific.
But even so, I did see the bug in ogre 1.7, so at least back then it wasn't brand specific.
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
Hehe 
I never saw any problems with Nvidia, not even on 1.7.
I had 2 users reporting the problem with 1.7 ATI D3D9, one of those also reported with 1.9 ATI D3D9 (the other hasn't tried it)
The user who reported for 1.9 has the following hardware http://pastebin.com/ceCy3Xek

I never saw any problems with Nvidia, not even on 1.7.
I had 2 users reporting the problem with 1.7 ATI D3D9, one of those also reported with 1.9 ATI D3D9 (the other hasn't tried it)
The user who reported for 1.9 has the following hardware http://pastebin.com/ceCy3Xek
-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
Ok so I'll take a look tomorrow with 1.9 last revision (it's too late right now) as I will be able to confirm on an ATI.
-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
Tested 1.9 ra16668556243 :
- DX9: NO PIXELS - so it's confirmed it don't work in 1.9;
- OGL: there is apparently a missing shadows.glsl file - can't test;
- DX11: got an exception about not being able to create gpu programs for render state;
- OGL3+: there is apparently a missing shadows.glsl file - can't test;
- DX9: NO PIXELS - so it's confirmed it don't work in 1.9;
- OGL: there is apparently a missing shadows.glsl file - can't test;
- DX11: got an exception about not being able to create gpu programs for render state;
- OGL3+: there is apparently a missing shadows.glsl file - can't test;
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
Thanks, I guess we now need to find out if this is an ATI driver bug or not? 

-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
It says my driver is up to date but keep in mind that it's not the most recent hardware.
Here are the info about the driver:
Driver Packaging Version 8.97.100.3-120703a-145534C-ATI
Catalyst Version 12.6
Provider Advanced Micro Devices, Inc.
2D Driver Version 8.01.01.1248
2D Driver File Path /REGISTRY/MACHINE/SYSTEM/ControlSet001/Control/CLASS/{4D36E968-E325-11CE-BFC1-08002BE10318}/0000
Direct3D Version 7.14.10.0911
OpenGL Version 6.14.10.11653
Catalyst Pro Control Center Version 2012.0704.122.388
Here are the info about the driver:
Driver Packaging Version 8.97.100.3-120703a-145534C-ATI
Catalyst Version 12.6
Provider Advanced Micro Devices, Inc.
2D Driver Version 8.01.01.1248
2D Driver File Path /REGISTRY/MACHINE/SYSTEM/ControlSet001/Control/CLASS/{4D36E968-E325-11CE-BFC1-08002BE10318}/0000
Direct3D Version 7.14.10.0911
OpenGL Version 6.14.10.11653
Catalyst Pro Control Center Version 2012.0704.122.388
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
Would be good to know if the bug exists in D3D11, perhaps there is another sample that works?
-
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
Re: filtering anisotropic point linear not working on d3d9/A
D3D caps as requested


-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
No all the errors I got where at SampleBrowser startup.sparkprime wrote:Would be good to know if the bug exists in D3D11, perhaps there is another sample that works?
I have no idea how to fix the DX11 problem.
-
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
Re: filtering anisotropic point linear not working on d3d9/A
sparkprime wrote:D3D caps as requested
Here is mine: http://imageshack.us/photo/my-images/811/dx9caps.jpg/