88er

Members
  • Content count

    87
  • Joined

  • Last visited

Community Reputation

135 Neutral

About 88er

  • Rank
    Member
  1. Dx caps viewer lists D3DFMT_D24S8\D3DFMT_D24X8\D3DFMT_D16\D3DFMT_D32F_LOCKABLE, I can CreateDevice use every value above(for depthformat) without any error. But the result looks no different.
  2. when two primitives have similar values in the z-buffer cause z-fighting, it can be solved by set the depthbuffer to D3DFMT_D24S8 in nv6600gt. But now,in nv8600gt,the depthbuffer seems can't be changed by my application. Depthbuffer is fixed to 32bits. In nvidia forums,someone side "Whilst the Geforce is capable of 32-bit color, the Z-Buffer is limited to 24-bit".
  3. I think nothing happen and no error report. The picture quality hadn't imporved from D3DFMT_D16 to D3DFMT_D24S8, no change happen. sorry for my bad english and thanks anyway.
  4. The setting dialog like d3dsample use F2 to Change device. my application works fine in NV 6600GT,someone side nv8 can't set depthbuffer bit.
  5. I update my engine to d3d2007,but when i change the depthbuffer format form D3DFMT_D16 to D3DFMT_D24S8 use setting dialog,it looks no change. even i Createdevice use D3DFMT_D16 and D3DFMT_D24S8,it get same result. directx version :4.09.0000.0904 videovard :NV 8600GTS video driver:2008.8.12 Is it a bug of d3d2007,it works fine in the oldversion. [Edited by - 88er on December 22, 2008 11:08:34 PM]
  6. vertex shader and fog.

    thanks a lot. btw i found the words in the +-Direct9 +--advanced topics +---Frame buffer +----fog type +-----vertex fog the sdk is November 2007.
  7. I use vertex shader process the vertex and set the fog use the code below. float fStart = 100.0f; float fEnd = 2000.0f; DWORD Color = 0x92a4a6; lpDev->SetRenderState(D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR); lpDev->SetRenderState(D3DRS_FOGSTART, *(DWORD *)(&fStart)); lpDev->SetRenderState(D3DRS_FOGEND, *(DWORD *)(&fEnd)); lpDev->SetRenderState(D3DRS_FOGCOLOR, Color); lpDev->SetRenderState(D3DRS_FOGENABLE, TRUE); there is no fog in the scene,but the code works well when i render scene use fixed function pipeline. but if i change the D3DRS_FOGVERTEXMODE to D3DRS_FOGTABLEMODE,the fog appears. why the pixel fog works well but vertex fog failed.It is said in D3DSDK "Quote: When using a vertex shader, you must use vertex fog. This is accomplished by using the vertex shader to write the per-vertex fog intensity to the oFog register. After the pixel shader completes, the oFog data is used to linearly interpolate with the fog color. This intensity is not available in a pixel shader "
  8. thanks for all help! After changed the dislplay driver,i got the correct result.
  9. thanks a lot. i use fxc.exe compile the hlsl code to the asm,i didn't find any error. then i try to change the sample BasicHLSL, ////BasicHLSL.fx //add a new variable bool g_bTexture; //change the PixelShader: PS_OUTPUT RenderScenePS( VS_OUTPUT In, uniform bool bTexture ) { PS_OUTPUT Output; // Lookup mesh texture and modulate it with diffuse if( g_bTexture ) Output.RGBColor = tex2D(MeshTextureSampler, In.TextureUV) * In.Diffuse; else Output.RGBColor = In.Diffuse; return Output; } ////BasicHLSL.cpp ... V_RETURN( g_pEffect->SetValue("g_MaterialAmbientColor", &colorMtrlAmbient, sizeof(D3DXCOLOR) ) ); V_RETURN( g_pEffect->SetValue("g_MaterialDiffuseColor", &colorMtrlDiffuse, sizeof(D3DXCOLOR) ) ); V_RETURN( g_pEffect->SetTexture( "g_MeshTexture", g_pMeshTexture) ); //set the g_bTexture V_RETURN( g_pEffect->SetBool("g_bTexture",TRUE)); // Setup the camera's view parameters D3DXVECTOR3 vecEye(0.0f, 0.0f, -15.0f); D3DXVECTOR3 vecAt (0.0f, 0.0f, -0.0f); ... it has the same bug with mine. i can make it use other way like Guimo's, but i want to know why?
  10. I wrote a simple PS shader, //effect.fx .... if(g_bUseTexture) { return tex2D( g_samScene, Tex0); } else { return diffuse; } ... i use SetBool("g_bUseTexture",TRUE) in main function , it works fine with PS1.4 or PS3.0,but when use PS2.0, it looks like doesn't run tex2d(g_samScene,Tex0). but the same code in dxsdk HDRLighting is OK. what's wrong??? Videocard:GF6600 DirectXSDK:9.0c2006Aug
  11. sorry for my bad english. In brief,I mean how to learn the fileformat of models in a game and use them in my own game. I know some people use nfs-tracks in their games ,how they do it.
  12. I just want to learn about the theory,i can't believe who can write a GameEditor by some unknowformat files. and which tool they use??how to start??
  13. I use CreateDialog,failed. Then i use atlAxCreateDialog,but only display a button control. The shockwave control still not be seen. code: g_hwndSplash = AtlAxCreateDialog(hInst,MAKEINTRESOURCE(IDD_DIALOG1), NULL,NULL,0); ShowWindow(g_hwndSplash, SW_SHOWNORMAL); UpdateWindow(g_hwndSplash); How to deal with. thanks.
  14. I got it. it can be done use by Present(NULL,&ControlRect,NULL,NULL), ControlRect is the destination rectangle