Skip to main content
GameDev.net gamedev.net
🔒 Locked

when i apply texture on a model

Started by thoue Jan 2, 2004 at 6:22 PM 3 replies 350+ views
Original Post
thoue
thoue
there i can see the pixel. Is there any blur function in texturestate or something. http://eleves_tim.cmaisonneuve.qc.ca/e0390205/pixeled.bmp **sorry about my english cause im french ***
**THOUE***Spec:Intel: 2.8GHzAti Radeon 9800 pro1024mg RAMDevelopping C# DX 9.0c appsThx you!
Caesar
Caesar
Hi,
search for a topic called Antialiasing in DirectX... it says:

D3DPRESENT_PARAMETER d3dPP
ZeroMemory( &d3dPP, sizeof( d3dPP ) );
d3dPP.Windowed = FALSE
d3dPP.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dPP.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES;
pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &d3dDevice)

so the

d3dPP.MultiSampleType = ... is probably the key thing there. Read the topic though as you should recognize if your gfx card supports antialiasing...




Nik02
Nik02
pDevice->SetSamplerState(0,D3DSAMP_MINFILTER,D3DTEXF_LINEAR);
Sets the texture minification filter to linear interpolation between nearest 2 pixels at sampler 0. Use D3DSAMP_MAGFILTER to set magnification filter; again I recommend linear for smooth operation.
Finally, D3DSAMP_MIPFILTER sets the mip-mapping interpolation mode - set this to linear for best quality filtering between mip levels.
Please ask more info if needed I''ll answer tomorrow!

-Nik
Niko Suni
thoue
thoue
Thx Nik my engine was needing some SetSamplerState setting. And it workrd.

Thx cae, but if i try ur setting the deveice failed to create no idea why.

**sorry about my english cause im french ***
**THOUE***Spec:Intel: 2.8GHzAti Radeon 9800 pro1024mg RAMDevelopping C# DX 9.0c appsThx you!
Nik02
Nik02
It entirely depends on the card whether it supports multisampling. Newer cards (< 1.5 year old) tend to support at least 4x true AA, while GF2 era cards supported only nonmaskable AA (ie. no programmer-configurable sampling), though often also 4x.
Check the caps viewer program included with the sdk to determine your card's capabilities.
Also see sdk docs for more info on antialiasing, even though your original post didn't have anything to do with that, in particular

glad to be of help,
-Nik

EDIT: To clarify, texture filtering has been supported on virtually every 3d hardware since 3DFX Voodoo 1. AA and filtering are totally independent features.

[edited by - Nik02 on January 3, 2004 4:35:28 AM]
Niko Suni

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.