# Reflection problem with a GeForce MX 4000

## Recommended Posts

Hi there. I created some mirrors in my application... It worked fine with a TNT2 and with a Radeon 9600Pro, but I'm getting a strange reflection problem in a GeForce MX 4000 card. The reflected image appears as I had applied a "noise filter". Does anyone know why this is happening and how to fix it? My code (in Direct3D) to create mirror is:
D3DXMATRIX armMat;

void DX::IniciaReflexao( LPDIRECT3DDEVICE9 pDevice,
D3DXVECTOR3 *a,		// Os 4 vértices do quadrilátero
D3DXVECTOR3 *b,		// espelhado, dispostos em seqüência
D3DXVECTOR3 *c,		// no sentido horário (a->b->c->d)
D3DXVECTOR3 *d,
D3DXVECTOR3 *CameraEye )
{

// Configurando os "clip planes" que delimintam o plano de reflexão
// Cada clip plane é definido por 2 vértices do plano + o olho da câmera
// ---------------------------------------------------------------------------------
D3DXPLANE  plane;
pDevice->SetClipPlane( 0, *D3DXPlaneFromPoints( &plane, b, a, CameraEye ) );
pDevice->SetClipPlane( 1, *D3DXPlaneFromPoints( &plane, c, b, CameraEye ) );
pDevice->SetClipPlane( 2, *D3DXPlaneFromPoints( &plane, d, c, CameraEye ) );
pDevice->SetClipPlane( 3, *D3DXPlaneFromPoints( &plane, a, d, CameraEye ) );

pDevice->SetRenderState( D3DRS_CLIPPLANEENABLE,
D3DCLIPPLANE0 |
D3DCLIPPLANE1 |
D3DCLIPPLANE2 |
D3DCLIPPLANE3 );

// Revertendo o CULLING
// ---------------------------------------------------------------------------------
pDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CW );

// Armazenando a matrix do espaço universal
// ---------------------------------------------------------------------------------
pDevice->GetTransform( D3DTS_WORLD, &armMat );

// Matrix de reflexão
// ---------------------------------------------------------------------------------
D3DXMATRIX matRef;
D3DXPlaneFromPoints( &plane, a, b, c );
D3DXMatrixReflect( &matRef, &plane );
pDevice->SetTransform( D3DTS_WORLD, &matRef );
}

void DX::FinalizaReflexao( LPDIRECT3DDEVICE9 pDevice )
{
// Restaurando os estados de renderização
pDevice->SetTransform( D3DTS_WORLD, &armMat );
pDevice->SetRenderState( D3DRS_CLIPPLANEENABLE, 0x00 );
pDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );
}



##### Share on other sites
Any chance of a screenshot? I can't see anything wrong with that code. Also, have you tried running it through the reference rasterizer, and do you have the latest graphics drivers installed?

##### Share on other sites
Quote:
 Original post by Evil SteveAny chance of a screenshot?

OK :)

Quote:
 ...Also, have you tried running it through the reference rasterizer...

Excuse my ignorance, but how do I do that?

Quote:
 ...do you have the latest graphics drivers installed?

humm... the graphics drivers are not the latest, but they are not old.

##### Share on other sites
Quote:
Original post by Mari_p
Quote:
 Original post by Evil SteveAny chance of a screenshot?

OK :)
[snip]
Quote:
 ...Also, have you tried running it through the reference rasterizer...

Excuse my ignorance, but how do I do that?

Quote:
 ...do you have the latest graphics drivers installed?

humm... the graphics drivers are not the latest, but they are not old.

The image seems to be borked just now. To use the reference rasterizer, use D3DDEVTYPE_REF instead of D3DDEVTYPE_HAL when you call CreateDevice(). It might be worthwhile upgrading the drivers, particularly if the reference rasterizer shows the same results as the TNT2 and ATi card.

EDIT: Ah, that site just doesn't allow direct linking. I have no idea what's causing that, sorry. I've never seen anything like that before :/

##### Share on other sites
Quote:
 To use the reference rasterizer, use D3DDEVTYPE_REF instead of D3DDEVTYPE_HAL when you call CreateDevice().

Oh... I'm stupid. I had understood another thing... My poor English embarrasses me sometimes... [embarrass]
Quote:
 I have no idea what's causing that, sorry. I've never seen anything like that before :/

No problem. Thanks for trying to help.

It is not the first time I have problems with GeForce MX 4000... What hell has in this card?!

##### Share on other sites
Quote:
 Original post by Mari_pIt is not the first time I have problems with GeForce MX 4000... What hell has in this card?!
[lol] You're far from the first (and probably not the last) to curse the existance of the GeForce 4 MX range!

Feature-wise they're not much more than a GeForce 2, yet they were released after the first Shader compatable cards and alongside the second wave of SM1 hardware. Being very cheap they found their way into LOTS of "bulk manufactured" PC's.

Jack

##### Share on other sites
Yeah the 'Graphics cards capabilities' pdf in the SDK reveals that geforce 4 mx's don't support user clip planes. Check the caps in your application. The reason it worked on the TNT2 is that they don't support hardware transform and lighting, so software processing was being used which supports clip planes. And of course the 9600 pro can handle them no problem.

##### Share on other sites
Quote:
 Original post by jameswYeah the 'Graphics cards capabilities' pdf in the SDK reveals that geforce 4 mx's don't support user clip planes. Check the caps in your application. The reason it worked on the TNT2 is that they don't support hardware transform and lighting, so software processing was being used which supports clip planes. And of course the 9600 pro can handle them no problem.

Thank you very much. I fixed the problem now. I would never imagine that GeForce 4 MX's don't support clip planes.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628354
• Total Posts
2982236

• 10
• 9
• 11
• 24
• 11