#include "client/rendering/NoiseTexture.h" #include "utils/Array.h" #include "utils/Random.h" NoiseTexture::NoiseTexture() { texture.init(TextureFormat::float32(3), 0); Random r(1); Array data; for(int i = 0; i < 48; i++) { data[i] = r.nextFloat() * 2.0f - 1.0f; } texture.setData(4, 4, data.begin()); } void NoiseTexture::bindTo(int index) const { texture.bindTo(index); }