Jump to content
  • Advertisement

ptl

Member
  • Content count

    100
  • Joined

  • Last visited

Community Reputation

157 Neutral

About ptl

  • Rank
    Member
  1. I do use the display format (X8R8G8B8), not the backbuffer format, still have the same problems... An other idea ?
  2. Hi there, I have implemented a new lighting algorithm using floating point texture blending, and I would be able to know, if hardware alpha blending with my G16R16F texture is supported on my graphic card. According to NVIDIA programmer Guide, the feature is available on my 8800 GTX and unavailable on my 7800 GTX. When I launch DirectX Caps Viewer, the floating point caps on a 8800 GTX is correctly detected. The DirectX Caps viewer also detects that my 7800 GTX have no hardware floating point blending. When I try to detect the feature in my code (I am using DirectX SDK November 2008), I look at the documentation on the CheckDeviceFormat function : Remarks • Alpha blending in a pixel shader - Set Usage to D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING. Expect this to fail for all floating-point render targets. So the CheckDeviceFormat function shouldn’t be able to detect the hardware blending feature according to the SDK documentation… I have tried these lines of code : if( FAILED( pD3D->CheckDeviceFormat( D3D_Settings.d3d9.AdapterOrdinal, D3D_Settings.d3d9.DeviceType, D3D_Settings.d3d9.AdapterFormat, D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, D3DRTYPE_SURFACE, D3DFMT_G16R16F ) ) ) { g_bSupportFPBlending = FALSE; } else { g_bSupportFPBlending = TRUE; } And Also : if( FAILED( pD3D->CheckDeviceFormat( D3D_Settings.d3d9.AdapterOrdinal, D3D_Settings.d3d9.DeviceType, D3D_Settings.d3d9.AdapterFormat, D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, D3DRTYPE_TEXTURE, D3DFMT_G16R16F ) ) ) { g_bSupportFPBlending = FALSE; } else { g_bSupportFPBlending = TRUE; } And Also : if( FAILED( pD3D->CheckDeviceFormat( D3D_Settings.d3d9.AdapterOrdinal, D3D_Settings.d3d9.DeviceType, D3D_Settings.d3d9.AdapterFormat, D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING| D3DUSAGE_RENDERTARGET, D3DRTYPE_SURFACE, D3DFMT_G16R16F ) ) ) { g_bSupportFPBlending = FALSE; } else { g_bSupportFPBlending = TRUE; } And Also : if( FAILED( pD3D->CheckDeviceFormat( D3D_Settings.d3d9.AdapterOrdinal, D3D_Settings.d3d9.DeviceType, D3D_Settings.d3d9.AdapterFormat, D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING| D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, D3DFMT_G16R16F ) ) ) { g_bSupportFPBlending = FALSE; } else { g_bSupportFPBlending = TRUE; } Results : g_bSupportFPBlending is always FALSE, on my 7800GTX and on the 8800 GTX. So the documentation is right, the function returns always FALSE with floating point formats. But how do they detect correctly the feature in the DirectX Caps Viewer code ? I don’t see any other function that can help me in the SDK, and I’m sure I’m missing something. Thanks in advance for your help. Frank
  3. Maybe you can use deffered shading. Then use additional multpass lighting for all things that cannot be included in the deffered shader (because of shader size limit).
  4. Hi all, I have a very usefull Visual Studio 6 macro (.dsm) that needs to open a document using the Documents.Open function, but now I'm using Visual Studio .NET and I can't find the matching command. Any ideas ? => Just found the solution : DTE.ItemOperations.OpenFile(sFilePath) Sorry for the noise :) [Edited by - ptl on October 26, 2005 4:21:16 AM]
  5. this thread contains information about dynamic bounding box hierarchy, and points on an other similar thread. hope it helps, ptl
  6. ptl

    Vertex Array performance

    And to be sure to get peak performance try VBO... it's the only way to be sure that the driver use transform and lighting
  7. I've found one bug : i should go from 0 to to 10, not to 9, otherwise the last level is missing. Now my textures aren't black any more but they still not contain the good pixels. _the_phantom_ : that's what I was looking for, thanks a lot :) I thought this wasn't working with glCopyTexImage2D, but it seems to work fine now.
  8. Hi all, I have a multipass rendering that first renders the scene with a reflected camera to the framebuffer, then copies it to a texture with glCopyTexImage2D, and then renders the scene adressing this texture (with projective mapping, but no matter). This works fine, but the problem is that I want to generate a mip-mapped version of this texture : I tried to use glPixelZoom, but my code doesn't work. Here is the kind of code that I use to copy the texture : // copy the texture glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, m_uRefractionTexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); int iZoom = 1; int iSize = 512; for (int i = 0 ; i < 9 ; i++) { glPixelZoom(iZoom, iZoom); glCopyTexImage2D(GL_TEXTURE_2D, i, GL_RGB, 0, 0, iSize, iSize, 0); iZoom*=2 iSize/=2; } glDisable(GL_TEXTURE_2D); Even when I disable glPixelZoom my mip maps are black, but it should contain something copied by glCopyTexImage2D even if it's not the good pixels. Any ideas ? [Edited by - ptl on June 15, 2005 6:16:41 PM]
  9. I think this may be a rounding error when you calculate your mirrored uv's. How do you exactly calculte them ?
  10. http://www.q3a.org/alien/pages/skybox.htm
  11. ptl

    Color Interpolation

    The kind of interpolation you are describing is roughtly equivalent (in time) to interpolate the normal and not the color, and by interpolating the normal (so by doing phong shading), you'll get better lighting than with your mehtod. I think that's why this method of interpolation is not used more in practice. But it remains interesting to have mentioned it. You could also try to interpolate in HLS space, it could also result in better shading, and it would be more or less equivalent to what you are doing.
  12. ptl

    Debugging Game Issue

    It surely means that the 'next' breakpoint is never reached, so your application is going on and on... That's why visual studio loses focus : it's because your app has focus, and the only thing you can do is stop debugging. => the link warning simply means your project is build in 'edit and continue' mode (you can modify the code while you are executing the program), this build options needs the 'incremental link' option to work. To get rid of the warning turn off edit and continue or turn on incremental build (in the link tab of your project settings).
  13. ptl

    A Good Java IDE

    I vote for Borland JBuilder. it's a very good IDE, doesn't eats an enormous amount of memory like many others, and it's quite fast (for a java IDE).
  14. You can pack/unpack floating point values in textures like Buttza said, however it results in some lack of precision, and some performance penality because of the by-hand unpacking in the shader. I recently tested performance of floating point textures against interger ones (32 bits only), and I seems that my GeForceFX 5900 Ultra outputs exactly the same fps with the two code paths, so floating point textures are the good choice. The only drawback it has is that you can have nor filtering nor mipmapping in hardware (must do it by hand), but it seems that GeForce 6800 series have corrected this drawback, so floating point textures has became a wonderful world ;) ptl
  15. ptl

    Scene-Graph

    Maybe that the spatial tree isn't usefull if you have a very simple scene : no alpha-blending pass, no occlusion culling. Elsewise the only drawback I see is that you must do the work twice each time you update an object.
  • 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!