Class TextureSampler
Hierarchy (View Summary)
- TextureSampler
Constructors
constructor
-
Creates a Sampler instance
Returns TextureSampler
Properties
Optionallabel
General label used for debugging or storing a name.
sampling Mode
Gets the sampling mode of the texture
Accessors
anisotropic Filtering Level
comparison Function
-
get comparisonFunction(): number
Gets or sets the comparison function (Constants.LESS, Constants.EQUAL, etc). Set 0 to not use a comparison function
Returns number
-
set comparisonFunction(value: number): void
Parameters
- value: number
Returns void
use Mip Maps
-
Indicates to use the mip maps (if available on the texture). Thanks to this flag, you can instruct the sampler to not sample the mipmaps even if they exist (and if the sampling mode is set to a value that normally samples the mipmaps!)
Returns Nullable<boolean>
-
Parameters
- value: Nullable<boolean>
Returns void
wrap R
wrap U
wrap V
Methods
compare Sampler
-
Compares this sampler with another one
Parameters
- other: TextureSampler
sampler to compare with
Returns boolean
true if the samplers have the same parametres, else false
- other: TextureSampler
set Parameters
-
setParameters(
wrapU?: number,
wrapV?: number,
wrapR?: number,
anisotropicFilteringLevel?: number,
samplingMode?: number,
comparisonFunction?: number,
): TextureSamplerSets all the parameters of the sampler
Parameters
- wrapU: number = Constants.TEXTURE_WRAP_ADDRESSMODE
u address mode (default: TEXTURE_WRAP_ADDRESSMODE)
- wrapV: number = Constants.TEXTURE_WRAP_ADDRESSMODE
v address mode (default: TEXTURE_WRAP_ADDRESSMODE)
- wrapR: number = Constants.TEXTURE_WRAP_ADDRESSMODE
r address mode (default: TEXTURE_WRAP_ADDRESSMODE)
- anisotropicFilteringLevel: number = 1
anisotropic level (default: 1)
- samplingMode: number = Constants.TEXTURE_BILINEAR_SAMPLINGMODE
sampling mode (default: Constants.TEXTURE_BILINEAR_SAMPLINGMODE)
- comparisonFunction: number = 0
comparison function (default: 0 - no comparison function)
Returns TextureSampler
the current sampler instance
- wrapU: number = Constants.TEXTURE_WRAP_ADDRESSMODE
Class used to store a texture sampler data