#pragma once #include #include "../datatypes.cpp" #include "../helpers.cpp" #include "../buffer.cpp" #include "texturebase.cpp" namespace UwU { class VGradientTexture : public TextureBase { public: VGradientTexture(uint16_t height, Color c0, Color c1) { this->vScale = 0xffffffff / (1 + (uint32_t)height); this->c0 = c0; this->c1 = c1; } uint32_t vScale; Color c0; Color c1; Color texel(uint16_t u, uint16_t v) { (void)u; uint32_t t = (((uint32_t)v) * vScale) / 0x01000000; return Helpers::lerpColor(c0, c1, (uint8_t)t); } }; }