Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311022

Enable mip filter for D3D 3D texture maps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx11, jfx20, 8
    • javafx
    • Cause Known
    • generic
    • windows

      While implementing JDK-8310109, noticed below behaviour in D3D pipeline:

      1. In OpenGL we set GL_TEXTURE_MIN_FILTER as GL_LINEAR_MIPMAP_LINEAR
      2. In Metal i am also planning to do the same. Set MIP_FILTER as well as MIN_FILTER to Linear
      3. But in D3D what is see is we don’t set D3DSAMP_MIPFILTER at all for 3D Texture maps. We set only D3DSAMP_MINFILTER & D3DSAMP_MAGFILTER filters to D3DTEXF_LINEAR. If we don’t set D3DSAMP_MIPFILTER, default is D3DTEXF_NONE

      We actually set D3DUSAGE_AUTOGENMIPMAP in D3DResourceManager.cc before creating the texture as described at https://learn.microsoft.com/en-us/windows/win32/direct3d9/automatic-generation-of-mipmaps

      But we dont set any MIP filter. I think we need to do proper state management and enable MIP filter when we use diffuse and selfllum texture maps. I think currently we are not using mipmaps in case of diffuse and selfllum texture maps in D3D in case of minification.

        1. 04.jpg
          04.jpg
          164 kB
        2. DiffuseMap_3D.java
          1 kB
        3. macOS_Metal_with_mipmapping.png
          macOS_Metal_with_mipmapping.png
          356 kB
        4. macOS_OpenGL_with_mipmapping.png
          macOS_OpenGL_with_mipmapping.png
          356 kB
        5. windows_D3D_with_mipmapping.png
          windows_D3D_with_mipmapping.png
          189 kB
        6. windows_D3D_without_mipmap.png
          windows_D3D_without_mipmap.png
          232 kB
        7. windows_Opengl_with_mipmapping.png
          windows_Opengl_with_mipmapping.png
          188 kB

            jdv Jayathirth D V
            jdv Jayathirth D V
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: