 |
InstancedMeshNodeSetDiffuseTexture(GpuImage, Color3, CommonSamplerTypes, Single) Method |
Sets the diffuse texture that will be rendered by each instance.
The specified color mask multiplied with each pixel in the texture.
By default, the sampler type is set to Miror and alpha clip threshold is set to 0.5.
When diffuseTexture is null, then the texture is removed.
Namespace: Ab4d.SharpEngine.SceneNodesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic void SetDiffuseTexture(
GpuImage? diffuseTexture,
Color3 colorMask,
CommonSamplerTypes diffuseTextureSamplerType = CommonSamplerTypes.Mirror,
float alphaClipThreshold = 0,5f
)
Parameters
- diffuseTexture GpuImage
- GpuImage that is used as a diffuse texture for each instance; when null, then the texture is removed
- colorMask Color3
- Color3 that is multiplied with each pixel in the texture
- diffuseTextureSamplerType CommonSamplerTypes (Optional)
- optional sampler type (Mirror by default)
- alphaClipThreshold Single (Optional)
- optional alpha clip threshold (alpha color values below this value will be clipped - not rendered and their depth will not be written to depth buffer). Default value is 0.5
See Also