|
Math v0.2.0
SIMD optimized C++ mathematics library
|
Texture (image) sampler 2D. More...
#include <sampler.hpp>
Public Member Functions | |
| Sampler2D (const void *texels, uint3 size) noexcept | |
| Creates a new 2D texture (image) sampler. | |
| template<class T = f32x4> | |
| T | get (uint2 position) const noexcept |
| Returns texel at specified position. | |
| template<class T = f32x4> | |
| T | sampleNearest (float2 uv, bool repeatMode=false) const noexcept |
| Samples nearest texel from an image. | |
Texture (image) sampler 2D.
|
inlinenoexcept |
Creates a new 2D texture (image) sampler.
| [in] | texels | target texture texel data |
| size | target texture 3D size in texels | |
| mipCount | texture mipmap level count |
|
inlinenoexcept |
Returns texel at specified position.
| position | texel 2D position and mipmap level |
| T | type of the texture pixel |
|
inlinenoexcept |
Samples nearest texel from an image.
| uv | 2D texture coordinates where to sample |
| repeatMode | clamp to border or repeat sampling mode |
| T | type of the texture pixel |