+ | Poorly done emissive texture

This commit is contained in:
TheRedShip
2025-02-01 21:32:37 +01:00
parent 0bb7315681
commit 328737ac4b
6 changed files with 60 additions and 13 deletions

View File

@ -76,12 +76,6 @@ int main(int argc, char **argv)
glBufferData(GL_SHADER_STORAGE_BUFFER, scene.getGPULights().size() * sizeof(int), nullptr, GL_STATIC_DRAW);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 6, lightSSBO);
GLuint textureSSBO;
glGenBuffers(1, &textureSSBO);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, textureSSBO);
glBufferData(GL_SHADER_STORAGE_BUFFER, 1 * sizeof(int), nullptr, GL_STATIC_DRAW);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 6, textureSSBO);
GLuint cameraUBO;
glGenBuffers(1, &cameraUBO);
glBindBuffer(GL_UNIFORM_BUFFER, cameraUBO);
@ -140,6 +134,7 @@ int main(int argc, char **argv)
shader.set_vec2("u_resolution", glm::vec2(WIDTH, HEIGHT));
shader.set_textures(scene.getTextureIDs());
shader.set_emission_textures(scene.getEmissionTextureIDs());
glDispatchCompute((WIDTH + 15) / 16, (HEIGHT + 15) / 16, 1);