Higher mipmap quality

Started by
7 comments, last by Lupin 21 years, 4 months ago
How could I adjust the quality of my mipmaps in D3D8? They look very blury
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!
Editor42 ...builds worlds
yep, I already thought about this, but I would preferr mipmaps with higher resolution or sth like that
I tried it, but mipmaps are still looking blurry, I already using highest setting (set by detonator driver).
I found out how to change the mipmap-lod-bias-parameter - problem solved
Could you share the information with us? I''ve got the same problem, and maybe you could help me, too.
I don''t need any signature ;-)
by reading the dx8 spec??
look at setTextureStageState

[edited by - MazyNoc on November 20, 2002 1:59:56 PM]
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 !
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

This topic is closed to new replies.

Advertisement