Текстура шума

This commit is contained in:
parent 129dc529a8
commit 2040bf7941
1 changed files with 9 additions and 0 deletions

View File

@ -281,6 +281,15 @@ int main(void)
// Загрузка данных в uniform-буфер
UBO ssaoUB(&ssao_data, sizeof(SSAO_data), 4);
// Текстура шума
glm::vec3 noise_vecs[16];
for (int i = 0; i < 16; i++)
noise_vecs[i] = { randomFloats(generator) * 2.0 - 1.0
, randomFloats(generator) * 2.0 - 1.0
, 0.0f
};
Texture noiseTexture(4,4, noise_vecs, 2, GL_RGBA32F, GL_RGB);
// Модель прямоугольника
Model rectangle;