Class TextureSampler
Hierarchy
- TextureSampler
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a Sampler instance
Returns TextureSampler
Properties
sampling ModeSearch playground for samplingMode
Gets the sampling mode of the texture
Accessors
anisotropic Filtering Level
-
With compliant hardware and browser (supporting anisotropic filtering) this defines the level of anisotropic filtering in the texture. The higher the better but the slower.
Returns Nullable<number>
-
With compliant hardware and browser (supporting anisotropic filtering) this defines the level of anisotropic filtering in the texture. The higher the better but the slower.
Parameters
-
value: Nullable<number>
Returns any
-
comparison Function
-
Gets or sets the comparison function (Constants.LESS, Constants.EQUAL, etc). Set 0 to not use a comparison function
Returns number
-
Gets or sets the comparison function (Constants.LESS, Constants.EQUAL, etc). Set 0 to not use a comparison function
Parameters
-
value: number
Returns any
-
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 boolean
-
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!)
Parameters
-
value: boolean
Returns any
-
wrapR
wrapU
wrapV
Methods
compare SamplerSearch playground for compareSampler
-
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
-
set ParametersSearch playground for setParameters
-
Sets all the parameters of the sampler
Parameters
-
Optional wrapU: number
u address mode (default: TEXTURE_WRAP_ADDRESSMODE)
-
Optional wrapV: number
v address mode (default: TEXTURE_WRAP_ADDRESSMODE)
-
Optional wrapR: number
r address mode (default: TEXTURE_WRAP_ADDRESSMODE)
-
Optional anisotropicFilteringLevel: number
anisotropic level (default: 1)
-
Optional samplingMode: number
sampling mode (default: Constants.TEXTURE_BILINEAR_SAMPLINGMODE)
-
Optional comparisonFunction: number
comparison function (default: 0 - no comparison function)
Returns TextureSampler
the current sampler instance
-
Class used to store a texture sampler data