mipmapping in directx

Return to Scripting Issues

mipmapping in directx

Postby teedee » Fri Jun 15, 2012 2:41 pm

Using the linear_mipmap_linear filter on my textures seems to have no effect in DirectX, though it does work in OpenGL. Does anyone have any experience with this? Is there some additional step I need to do to get mipmaps with DirectX?
teedee
 
Posts: 782
Joined: Tue May 12, 2009 11:33 pm
Location: Kepler-22b

Postby zhao » Mon Jun 18, 2012 12:33 pm

I don't have problems with mipmaps under Dx9. I checked this with a Win7/GTX 260 and a WinXP/Amd 5450. But I'm using an old (6 month) build of Panda and I'm not sure if anything has been changed recently.

If you want, you can send me a minimal sample of your code + art that has the problem and I can check it on my computer.

Zhao
zhao
 
Posts: 224
Joined: Tue Nov 10, 2009 5:32 pm

Postby teedee » Sun Aug 19, 2012 5:03 pm

Thanks for replying, I missed it somehow.
I've put together the simplest possible demo.
http://novuscom.net/~spacebullet/out/mipmap_test.zip
I tested 1.7.2, 1.8.0, and the latest snapshot build, all with the same results:

GL
Image

DX9
Image
teedee
 
Posts: 782
Joined: Tue May 12, 2009 11:33 pm
Location: Kepler-22b

Postby zhao » Sun Aug 19, 2012 11:21 pm

Hi teedee,

I think I found your problem. Try manually setting the texture filter.

Code: Select all
        plane = self.loader.loadModel('/c/test/Newfolder/card')
        tex = loader.loadTexture( '/c/test/Newfolder/checker.png' )
        tex.setMinfilter( Texture.FTLinearMipmapLinear )
        tex.setMagfilter( Texture.FTLinear )
        plane.setTexture( tex, 100000 )
        plane.reparentTo(self.render)
        self.cam.setPos(0, -50, 5)


Making this change on my computer fixes the problem. Mostly likely, the texture set for the dx9 branch is not checking the loadprc when setting the texture params.

Zhao
zhao
 
Posts: 224
Joined: Tue Nov 10, 2009 5:32 pm

Postby teedee » Mon Aug 20, 2012 12:21 am

Awesome, it works if I put the filter in the EGG file.
I'll see if i can find the problem in the panda code.
teedee
 
Posts: 782
Joined: Tue May 12, 2009 11:33 pm
Location: Kepler-22b


Return to Scripting Issues

Who is online

Users browsing this forum: No registered users and 0 guests