nativeTex | Native 3D texture object. |
width | ピクセル単位でのテクスチャの幅 |
height | ピクセル単位でのテクスチャの高さ |
depth | Depth of texture in pixels |
format | 下地となるテクスチャオブジェクトの形式 |
mipmap | テクスチャにミップマップがあるかどうか |
外部で作成されたネイティブのテクスチャオブジェクトから Unity テクスチャを作成します。
This function is mostly useful for native code plugins that create platform specific texture
objects outside of Unity, and need to use these textures in Unity Scenes. It is also possible to create a texture in Unity and
get a pointer to the underlying platform representation; see Texture.GetNativeTexturePtr.
Parameters passed to CreateExternalTexture should match what the texture actually is; and the underlying texture should be 3D.
Native texture object on Direct3D-like devices is a pointer to the base type, from which a texture can be created:
• D3D11: ID3D11ShaderResourceView*
or ID3D11Texture3D*
• D3D12: ID3D12Texture3D*
On OpenGL/OpenGL ES it is GLuint
.
On Metal it is id<MTLTexture>
.
For Vulkan, the nativeTex
parameter is a VkImage*
.
Additional resources: UpdateExternalTexture, Texture.GetNativeTexturePtr.