From 2040bf7941690f5bfe93cb178e8176a8f014bf28 Mon Sep 17 00:00:00 2001 From: "re.kovalev" Date: Sun, 15 Jan 2023 03:13:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B5=D0=BA=D1=81=D1=82=D1=83=D1=80?= =?UTF-8?q?=D0=B0=20=D1=88=D1=83=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 27a4804..0bbab45 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -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;