waynecochran
4 months agoExplorer
How to enable / disable mipmaps when creating a SceneTexture from a Bitmap?
I don't see a SceneTexture constructor that takes a bitmap as an argument AND disables or enables mipmapping.
val samplerConfig = SamplerConfig(
mipmapMode = Filter.NEAREST,
minFilter = Filter.NEAREST,
magFilter = Filter.NEAREST,
addressModeU = AddressMode.CLAMP_TO_EDGE,
addressModeV = AddressMode.CLAMP_TO_EDGE,
lodBias = 0.0f
)
val myTexture = SceneTexture(myBitmap, samplerConfig)
Are mipmaps auto always generated here? Is there anyway to control this (e.g., what if I don't want mipmapping)?
Other SceneTexture constructors have a `numberOfMips` argument, but none of those take a Bitmap as an argument. Perhaps this is controlled at the SceneMaterial level, but I don't see anything concerning mipmaps there.