RFR: 8373232: Set default filters and addressing modes for 3D metal textures
Jayathirth D V
jdv at openjdk.org
Mon Dec 15 04:34:36 UTC 2025
On Fri, 12 Dec 2025 13:56:31 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:
> In general looks good, but I have one question to double-check something I couldn't find.
>
> The sampler is chosen based on whether we use mipmaps or not. In cases where mipmaps are not used, are we still generating them?
@lukostyra Thanks for the review.
We use mipmap only for diffuse and self illumination maps : https://github.com/openjdk/jfx/blob/master/modules/javafx.graphics/src/main/java/com/sun/prism/mtl/MTLPhongMaterial.java#L100
We pass this mipmap flag to the native code when texture is getting created. And we use this flag and generate mipmaps only for the textures where this flag is true : https://github.com/openjdk/jfx/blob/master/modules/javafx.graphics/src/main/native-prism-mtl/MetalTexture.m#L203
So for non-mipmapped 3D textures we don't generate mipmaps.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/2005#issuecomment-3652836820
More information about the openjfx-dev
mailing list