Add new wrap mode "clampone". Pixels sampled outside of [0, 1] are white (1, 1, 1, 1).

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2019-12-27 13:57:20 -05:00
parent 76121ec152
commit 361cefbb05
7 changed files with 35 additions and 14 deletions
+3
View File
@@ -67,6 +67,7 @@ public:
{
WRAP_CLAMP,
WRAP_CLAMP_ZERO,
WRAP_CLAMP_ONE,
WRAP_REPEAT,
WRAP_MIRRORED_REPEAT,
WRAP_MAX_ENUM
@@ -153,6 +154,8 @@ public:
static int getTotalMipmapCount(int w, int h);
static int getTotalMipmapCount(int w, int h, int d);
static bool isClampZeroOrOne(WrapMode w) { return w == WRAP_CLAMP_ZERO || w == WRAP_CLAMP_ONE; }
static bool getConstant(const char *in, TextureType &out);
static bool getConstant(TextureType in, const char *&out);
static std::vector<std::string> getConstants(TextureType);