diff --git a/.vs/grk-project/v16/.suo b/.vs/grk-project/v16/.suo index 51449f1..0ccabdb 100644 Binary files a/.vs/grk-project/v16/.suo and b/.vs/grk-project/v16/.suo differ diff --git a/Release/room.exe b/Release/room.exe index 06ad7e8..0b3dedb 100644 Binary files a/Release/room.exe and b/Release/room.exe differ diff --git a/Release/room.pdb b/Release/room.pdb index ab6502b..ad6aa5c 100644 Binary files a/Release/room.pdb and b/Release/room.pdb differ diff --git a/cw 9/Release/Box.obj b/cw 9/Release/Box.obj index 07c3397..19e40bd 100644 Binary files a/cw 9/Release/Box.obj and b/cw 9/Release/Box.obj differ diff --git a/cw 9/Release/Camera.obj b/cw 9/Release/Camera.obj index 1e70af3..82124a9 100644 Binary files a/cw 9/Release/Camera.obj and b/cw 9/Release/Camera.obj differ diff --git a/cw 9/Release/Render_Utils.obj b/cw 9/Release/Render_Utils.obj index 631c002..d95fb17 100644 Binary files a/cw 9/Release/Render_Utils.obj and b/cw 9/Release/Render_Utils.obj differ diff --git a/cw 9/Release/SOIL.obj b/cw 9/Release/SOIL.obj index 5259303..d59eedb 100644 Binary files a/cw 9/Release/SOIL.obj and b/cw 9/Release/SOIL.obj differ diff --git a/cw 9/Release/Shader_Loader.obj b/cw 9/Release/Shader_Loader.obj index 3736096..b1a4f1d 100644 Binary files a/cw 9/Release/Shader_Loader.obj and b/cw 9/Release/Shader_Loader.obj differ diff --git a/cw 9/Release/Texture.obj b/cw 9/Release/Texture.obj index 0ebe80e..e1a0075 100644 Binary files a/cw 9/Release/Texture.obj and b/cw 9/Release/Texture.obj differ diff --git a/cw 9/Release/grk-cw9.log b/cw 9/Release/grk-cw9.log index a9de21b..d57ca2b 100644 --- a/cw 9/Release/grk-cw9.log +++ b/cw 9/Release/grk-cw9.log @@ -1,41 +1,41 @@  main.cpp C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": ponowna definicja makra -C:\Users\Genos\Source\Repos\GRK_Room22\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : zobacz poprzednią definicję „APIENTRY” -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(107,30): warning C4305: "inicjowanie": obcięcie z "double" do "float" -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(122,38): warning C4305: "=": obcięcie z "double" do "float" -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(145,16): warning C4305: "inicjowanie": obcięcie z "double" do "float" -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(166,16): warning C4305: "inicjowanie": obcięcie z "double" do "float" -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(185,15): warning C4101: "textureID": lokalna zmienna, do której nie istnieje odwołanie -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(268,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(279,96): warning C4305: "argument": obcięcie z "double" do "T" +C:\Users\annas\Desktop\graf\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : zobacz poprzednią definicję „APIENTRY” +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(107,30): warning C4305: "inicjowanie": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(122,38): warning C4305: "=": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(145,16): warning C4305: "inicjowanie": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(166,16): warning C4305: "inicjowanie": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(185,15): warning C4101: "textureID": lokalna zmienna, do której nie istnieje odwołanie +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(287,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(298,96): warning C4305: "argument": obcięcie z "double" do "T" with [ T=float ] -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(283,59): warning C4305: "argument": obcięcie z "double" do "T" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(302,59): warning C4305: "argument": obcięcie z "double" do "T" with [ T=float ] -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(441,29): warning C4018: "<": niezgodność typu ze znakiem/bez znaku -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(482,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(495,108): warning C4305: "argument": obcięcie z "double" do "T" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(460,29): warning C4018: "<": niezgodność typu ze znakiem/bez znaku +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(501,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(514,108): warning C4305: "argument": obcięcie z "double" do "T" with [ T=float ] -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(506,59): warning C4305: "argument": obcięcie z "double" do "T" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(525,59): warning C4305: "argument": obcięcie z "double" do "T" with [ T=float ] -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(507,37): warning C4305: "argument": obcięcie z "double" do "float" -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(540,2): warning C4305: "argument": obcięcie z "double" do "float" -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(664,21): warning C4305: "-=": obcięcie z "double" do "float" -C:\Users\Genos\source\repos\GRK_Room22\cw 9\src\room.hpp(666,21): warning C4305: "+=": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(526,37): warning C4305: "argument": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(559,2): warning C4305: "argument": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(684,21): warning C4305: "-=": obcięcie z "double" do "float" +C:\Users\annas\Desktop\graf\cw 9\src\room.hpp(686,21): warning C4305: "+=": obcięcie z "double" do "float" Trwa generowanie kodu - 1 of 595 functions ( 0.2%) were compiled, the rest were copied from previous compilation. + 3 of 595 functions ( 0.5%) were compiled, the rest were copied from previous compilation. 0 functions were new in current compilation - 10 functions had inline decision re-evaluated but remain unchanged + 7 functions had inline decision re-evaluated but remain unchanged Zakończono generowanie kodu - grk-cw9.vcxproj -> C:\Users\Genos\Source\Repos\GRK_Room22\Release\room.exe + grk-cw9.vcxproj -> C:\Users\annas\Desktop\graf\Release\room.exe diff --git a/cw 9/Release/image_DXT.obj b/cw 9/Release/image_DXT.obj index b782bfe..b45e6bd 100644 Binary files a/cw 9/Release/image_DXT.obj and b/cw 9/Release/image_DXT.obj differ diff --git a/cw 9/Release/image_helper.obj b/cw 9/Release/image_helper.obj index 0832bd1..b18245d 100644 Binary files a/cw 9/Release/image_helper.obj and b/cw 9/Release/image_helper.obj differ diff --git a/cw 9/Release/main.obj b/cw 9/Release/main.obj index 69693b2..1b3c2fe 100644 Binary files a/cw 9/Release/main.obj and b/cw 9/Release/main.obj differ diff --git a/cw 9/Release/room.exe.recipe b/cw 9/Release/room.exe.recipe index b3d470d..7e3233f 100644 --- a/cw 9/Release/room.exe.recipe +++ b/cw 9/Release/room.exe.recipe @@ -2,7 +2,7 @@ - C:\Users\Genos\Source\Repos\GRK_Room22\Release\room.exe + C:\Users\annas\Desktop\graf\Release\room.exe diff --git a/cw 9/Release/room.iobj b/cw 9/Release/room.iobj index b797a99..3ac367a 100644 Binary files a/cw 9/Release/room.iobj and b/cw 9/Release/room.iobj differ diff --git a/cw 9/Release/room.ipdb b/cw 9/Release/room.ipdb index e5906b3..453cde4 100644 Binary files a/cw 9/Release/room.ipdb and b/cw 9/Release/room.ipdb differ diff --git a/cw 9/Release/room.tlog/CL.command.1.tlog b/cw 9/Release/room.tlog/CL.command.1.tlog index 17e1310..fa2e57e 100644 Binary files a/cw 9/Release/room.tlog/CL.command.1.tlog and b/cw 9/Release/room.tlog/CL.command.1.tlog differ diff --git a/cw 9/Release/room.tlog/CL.read.1.tlog b/cw 9/Release/room.tlog/CL.read.1.tlog index 34bf6c4..87e7723 100644 Binary files a/cw 9/Release/room.tlog/CL.read.1.tlog and b/cw 9/Release/room.tlog/CL.read.1.tlog differ diff --git a/cw 9/Release/room.tlog/CL.write.1.tlog b/cw 9/Release/room.tlog/CL.write.1.tlog index 4b46bac..557ca7c 100644 Binary files a/cw 9/Release/room.tlog/CL.write.1.tlog and b/cw 9/Release/room.tlog/CL.write.1.tlog differ diff --git a/cw 9/Release/room.tlog/link.command.1.tlog b/cw 9/Release/room.tlog/link.command.1.tlog index ed41cbd..3d87186 100644 Binary files a/cw 9/Release/room.tlog/link.command.1.tlog and b/cw 9/Release/room.tlog/link.command.1.tlog differ diff --git a/cw 9/Release/room.tlog/link.read.1.tlog b/cw 9/Release/room.tlog/link.read.1.tlog index 906fa6f..c1fa650 100644 Binary files a/cw 9/Release/room.tlog/link.read.1.tlog and b/cw 9/Release/room.tlog/link.read.1.tlog differ diff --git a/cw 9/Release/room.tlog/link.write.1.tlog b/cw 9/Release/room.tlog/link.write.1.tlog index 0ccb955..42b372f 100644 Binary files a/cw 9/Release/room.tlog/link.write.1.tlog and b/cw 9/Release/room.tlog/link.write.1.tlog differ diff --git a/cw 9/Release/room.tlog/room.lastbuildstate b/cw 9/Release/room.tlog/room.lastbuildstate index 18dff22..ba43894 100644 --- a/cw 9/Release/room.tlog/room.lastbuildstate +++ b/cw 9/Release/room.tlog/room.lastbuildstate @@ -1,2 +1,2 @@ PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: -Release|Win32|C:\Users\Genos\Source\Repos\GRK_Room22\| +Release|Win32|C:\Users\annas\Desktop\graf\| diff --git a/cw 9/Release/stb_image_aug.obj b/cw 9/Release/stb_image_aug.obj index b0d1ab2..cdca64e 100644 Binary files a/cw 9/Release/stb_image_aug.obj and b/cw 9/Release/stb_image_aug.obj differ diff --git a/cw 9/Release/vc142.pdb b/cw 9/Release/vc142.pdb index 33c8be1..297ba88 100644 Binary files a/cw 9/Release/vc142.pdb and b/cw 9/Release/vc142.pdb differ diff --git a/cw 9/shaders/shader_skybox.frag b/cw 9/shaders/shader_skybox.frag index 575b0fa..dd54407 100644 --- a/cw 9/shaders/shader_skybox.frag +++ b/cw 9/shaders/shader_skybox.frag @@ -1,16 +1,18 @@ #version 430 core uniform samplerCube skybox; - +uniform float exposition; in vec3 texCoord; - +out vec4 outColor; layout (location = 0) out vec4 FragColor; layout (location = 1) out vec4 BloomColor; void main() { - FragColor = texture(skybox,texCoord); + outColor = vec4(vec3(1.0) - exp(-texture(skybox,texCoord).rgb*exposition),1); + + FragColor = outColor; float brightness = dot(FragColor.rgb, vec3(0.2126, 0.7152, 0.0722)); if(brightness > 1.0) BloomColor = vec4(FragColor.rgb, 1.0); diff --git a/cw 9/src/room.hpp b/cw 9/src/room.hpp index 2d7d74a..e3d0454 100644 --- a/cw 9/src/room.hpp +++ b/cw 9/src/room.hpp @@ -213,14 +213,33 @@ void drawObjectDepth(Core::RenderContext& context, glm::mat4 viewProjection, glm } +//void drawSkyBox(Core::RenderContext& context, glm::mat4 modelMatrix) { +// glDisable(GL_DEPTH_TEST); +// glUseProgram(programSkybox); +// glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix(); +// glm::mat4 transformation = viewProjectionMatrix * modelMatrix; +// glUniformMatrix4fv(glGetUniformLocation(programSkybox, "transformation"), 1, GL_FALSE, (float*)&transformation); +// glUniform1i(glGetUniformLocation(programSkybox, "skybox"), 10); +// //Core::SetActiveTexture(texture::cubemapTexture, "skybox", programSkybox, 10); +// glUniform1f(glGetUniformLocation(programSkybox, "exposition"), exposition); +// Core::DrawContext(context); +// glEnable(GL_DEPTH_TEST); +//} + void drawSkyBox(Core::RenderContext& context, glm::mat4 modelMatrix) { glDisable(GL_DEPTH_TEST); + glUseProgram(programSkybox); + glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix(); glm::mat4 transformation = viewProjectionMatrix * modelMatrix; + glUniformMatrix4fv(glGetUniformLocation(programSkybox, "transformation"), 1, GL_FALSE, (float*)&transformation); - glUniform1i(glGetUniformLocation(programSkybox, "skybox"), 0); + Core::SetActiveTexture(texture::cubemapTexture, "skybox", programSkybox, 0); + glUniform1f(glGetUniformLocation(programSkybox, "exposition"), exposition); + Core::DrawContext(context); + glEnable(GL_DEPTH_TEST); } @@ -550,12 +569,12 @@ void renderScene(GLFWwindow* window) glBindFramebuffer(GL_FRAMEBUFFER, 0); //test depth buffer - //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glUseProgram(programTest); Core::SetActiveTexture(colorBuffers[0], "color", programTest, 0); Core::SetActiveTexture(pingpongBuffer[1], "highlight", programTest, 1); //Core::SetActiveTexture(colorBuffers[0],prog) - //Core::DrawContext(models::testContext); + Core::DrawContext(models::testContext); glUseProgram(0); glfwSwapBuffers(window); @@ -567,6 +586,7 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height) WIDTH = width; HEIGHT = height; } + void loadModelToContext(std::string path, Core::RenderContext& context) { Assimp::Importer import; @@ -674,13 +694,14 @@ void processInput(GLFWwindow* window) } + // funkcja jest glowna petla void renderLoop(GLFWwindow* window) { while (!glfwWindowShouldClose(window)) - { + { processInput(window); - renderScene(window); + //glfwSwapBuffers(window); glfwPollEvents(); } }