compression
TypeScriptget compression(): Promise<TextureResource_Compression>Swift declarationvar compression: TextureResource.Compressionstruct · iOS 15.0+ · SDK 27.1
struct CreateOptionsAn object that holds texture resource creation options.
get compression(): Promise<TextureResource_Compression>Swift declarationvar compression: TextureResource.CompressionsetCompression(value: TextureResource_Compression): Promise<void>Swift declarationvar compression: TextureResource.Compressionget mipmapsMode(): Promise<TextureResource_MipmapsMode>Swift declarationvar mipmapsMode: TextureResource.MipmapsModeWhether the texture resource automatically generates mipmaps.
setMipmapsMode(value: TextureResource_MipmapsMode): Promise<void>Swift declarationvar mipmapsMode: TextureResource.MipmapsModeWhether the texture resource automatically generates mipmaps.
static initSemanticCompressionMipmapsMode(semantic: (TextureResource_Semantic) | null, compression: TextureResource_Compression, mipmapsMode?: TextureResource_MipmapsMode): Promise<TextureResource_CreateOptions>Swift declarationinit(semantic: TextureResource.Semantic?, compression: TextureResource.Compression, mipmapsMode: TextureResource.MipmapsMode = .allocateAndGenerateAll)Creates a texture creation options structure. The `semantic` value you pass tells RealityKit how you plan to use the texture data from this resource. For example, passing ``RealityKit/TextureResource/Semantic-swift.enum/color`` lets RealityKit know you're using the texture to pass perceptual color information to the shaders, such as for providing a UV-mapped base color for physically based rendering materials. Passing ``RealityKit/TextureResource/Semantic-swift.enum/raw`` tells RealityKit to pass the pixel values with as little processing as possible. If semantic is `nil`, RealityKit tries to infer a semantic from the texture's source data. If it's unable to determine a semantic from the texture source data, it will infer a semantic from the texture's usage. Providing a value for `semantic` ensures that RealityKit passes the texture resource exactly as you intend. - Note: RealityKit only takes embedded color space data into account when rendering a texture if you pass ``RealityKit/TextureResource/Semantic-swift.enum/color`` for `semantic`. - Parameters: - semantic: The intended use of the texture resource. - mipmapsMode: Whether to automatically allocate or generate mipmaps. - compression:Compression to be applied to the texture.
static initSemanticMipmapsMode(semantic?: (TextureResource_Semantic) | null, mipmapsMode?: TextureResource_MipmapsMode): Promise<TextureResource_CreateOptions>Swift declarationinit(semantic: TextureResource.Semantic?, mipmapsMode: TextureResource.MipmapsMode = .allocateAndGenerateAll)Creates a texture creation options structure. The `semantic` value you pass tells RealityKit how you plan to use the texture data from this resource. For example, passing ``RealityKit/TextureResource/Semantic-swift.enum/color`` lets RealityKit know you're using the texture to pass perceptual color information to the shaders, such as for providing a UV-mapped base color for physically based rendering materials. Passing ``RealityKit/TextureResource/Semantic-swift.enum/raw`` tells RealityKit to pass the pixel values with as little processing as possible. If semantic is `nil`, RealityKit tries to infer a semantic from the texture's source data. If it's unable to determine a semantic from the texture source data, it will infer a semantic from the texture's usage. Providing a value for `semantic` ensures that RealityKit passes the texture resource exactly as you intend. - Note: RealityKit only takes embedded color space data into account when rendering a texture if you pass ``RealityKit/TextureResource/Semantic-swift.enum/color`` for `semantic`. - Parameters: - semantic: The intended use of the texture resource. - mipmapsMode: Whether to automatically allocate or generate mipmaps.
get semantic(): Promise<(TextureResource_Semantic) | null>Swift declarationvar semantic: TextureResource.Semantic?The intended use of the texture.
setSemantic(value?: (TextureResource_Semantic) | null): Promise<void>Swift declarationvar semantic: TextureResource.Semantic?The intended use of the texture.
No declarations were skipped in this snapshot.