12345678910111213141516 |
- #include "client/rendering/NoiseTexture.h"
- #include "common/utils/Random.h"
- #include "common/utils/List.h"
- NoiseTexture::NoiseTexture() {
- Random r(1);
- List<float, 48> data;
- for(uint i = 0; i < data.getCapacity(); i++) {
- data.add(r.nextFloat() * 2.0f - 1.0f);
- }
- texture.setRGBFloatData(4, 4, data.getData());
- }
- void NoiseTexture::bind(uint index) const {
- texture.bind(index);
- }
|