Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Lupin

Higher mipmap quality

This topic is 5785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
The best way to fix this problem is by using anisotropic filtering instead of trilinear filtering.

However, on some older hardware, anisotropic isn''t worth the performance loss. With Radeon 8500, GF4 Ti4200 and higher the loss is almost negligible for the quality gained.

Radeon are especially good at that because they are turning off anisotropic filtering on faces within a certain angular threshold to the eye ray. That way you are not loosing performance on faces that don''t need it.

nVidia call it cheating, I call it brilliant since there is no quality loss.

______________________________
Oooh, you found the horadric cube!

Share this post


Link to post
Share on other sites
yep, I already thought about this, but I would preferr mipmaps with higher resolution or sth like that

Share this post


Link to post
Share on other sites
I tried it, but mipmaps are still looking blurry, I already using highest setting (set by detonator driver).

Share this post


Link to post
Share on other sites
Lupin, if you got the bias working,
please tell me what''s wrong with my

float bias = 3.0f;
device->SetTextureStageState(0, D3DTSS_MIPMAPLODBIAS, *( (LPDWORD) (&bias) ) );

It has no effect at all !

Share this post


Link to post
Share on other sites
bratsj, this code should be correct, you should use an value like -2 or -3 to get mipmaps with higher quality

since I''m using VB my code is looking an little bit different, but I think it''s doing the same as yours bratsj, I''m using an function from dx4vb.da.ru to get my float into an long:


D3Ddevice.SetTextureStageState 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 0, D3DTSS_MIPFILTER, D3DTEXF_LINEAR

D3Ddevice.SetTextureStageState 1, D3DTSS_MAGFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 1, D3DTSS_MINFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 1, D3DTSS_MIPFILTER, D3DTEXF_LINEAR


Dim fBias As Single
fBias = -1#
D3Ddevice.SetTextureStageState 0, D3DTSS_MIPMAPLODBIAS, FloatToDWord(fBias)
D3Ddevice.SetTextureStageState 1, D3DTSS_MIPMAPLODBIAS, FloatToDWord(fBias)


Public Function FloatToDWord(ByVal f As Single) As Long
''this function packs a 32bit floating point number
''into a 32bit integer number; quite slow - dont overuse.
''DXCopyMemory or CopyMemory() (win32 api) would ''probably be faster...
Dim buf As D3DXBuffer
Dim l As Long
Set buf = D3DX.CreateBuffer(4)
D3DX.BufferSetData buf, 0, 4, 1, f
D3DX.BufferGetData buf, 0, 4, 1, l
FloatToDWord = l
End Function


these are all my settings for mipmaping-stuff

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!