 |
StandardMaterialBaseCreateDiffuseTexture(VulkanDevice, RawImageData, CommonSamplerTypes, String, Single) Method |
CreateDiffuseTexture creates a GpuImage object from the specified rawImageData.
The method sets the
DiffuseTexture,
DiffuseTextureSamplerType and
DiffuseTextureSampler properties.
Calling this method requires a valid gpuDevice objects.
If you want to lazily create a diffuse texture before the device is known, call the method without the gpuDevice parameter.
The created GpuImage is disposed when this Material is disposed.
Namespace: Ab4d.SharpEngine.MaterialsAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntaxpublic GpuImage CreateDiffuseTexture(
VulkanDevice gpuDevice,
RawImageData rawImageData,
CommonSamplerTypes samplerType = CommonSamplerTypes.Mirror,
string? imageSource = null,
float alphaClipThreshold = 0f
)
Parameters
- gpuDevice VulkanDevice
- VulkanDevice
- rawImageData RawImageData
- RawImageData with texture data
- samplerType CommonSamplerTypes (Optional)
- texture sampler type (Mirror by default)
- imageSource String (Optional)
- optional string that defines the source of the image (usually file name)
- alphaClipThreshold Single (Optional)
- optional float that defines the AlphaClipThreshold (0 by default)
Return Value
GpuImagereturns created GpuImage
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Materials.StandardMaterialBase.CreateDiffuseTexture(Ab4d.SharpEngine.Vulkan.VulkanDevice,Ab4d.SharpEngine.Common.RawImageData,Ab4d.SharpEngine.Common.CommonSamplerTypes,System.String,System.Single)"]
See Also