 |
PhysicallyBasedMaterialSetTextureMap(TextureMapTypes, Stream, String, IBitmapIO, CommonSamplerTypes, Boolean, Boolean, Boolean) Method |
SetTextureMap updates (when the same mapType was already added) or adds a map type to this PhysicallyBasedMaterial.
The texture is created from the provided file stream.
If this material is not yet initialized, then the texture is loaded when initialized.
Namespace: Ab4d.SharpEngine.MaterialsAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic void SetTextureMap(
TextureMapTypes mapType,
Stream fileStream,
string? streamFileName,
IBitmapIO? bitmapIO = null,
CommonSamplerTypes samplerType = CommonSamplerTypes.Mirror,
bool useSceneCache = false,
bool useGpuDeviceCache = true,
bool loadInBackground = false
)
Parameters
- mapType TextureMapTypes
- type of texture map - one of TextureMapTypes
- fileStream Stream
- file stream
- streamFileName String
- optional file name (needs to be set when useSceneCache is true)
- bitmapIO IBitmapIO (Optional)
- Optional IBitmapIO that is used to load the texture. When null, then the DefaultBitmapIOis used
- samplerType CommonSamplerTypes (Optional)
- texture sampler type (Mirror by default)
- useSceneCache Boolean (Optional)
- when true (false by default) than before loading the image the Scene's cache is checked if this file was already loaded. Also, the created GpuImage is cached by the Scene's cache.
- useGpuDeviceCache Boolean (Optional)
- when true (true by default) than before loading the image the GpuDevice's cache is checked if this file was already loaded. Also, the created GpuImage is cached by the GpuDevice's cache
- loadInBackground Boolean (Optional)
- when true (false by default) then the texture file is loaded in the background thread
See Also