From 87a7e2919fd53829699a8e044f67c73550d6cec2 Mon Sep 17 00:00:00 2001 From: Generacja Date: Sun, 12 Feb 2023 12:28:21 +0100 Subject: [PATCH] poprawa geometrypass --- .vs/grk-project/v16/.suo | Bin 79360 -> 87552 bytes .vs/grk-project/v16/Browse.VC.db | Bin 50434048 -> 50434048 bytes cw 9/shaders/shader_blur.frag | 42 ++++++++++++------ cw 9/shaders/shader_blur.vert | 27 +++--------- cw 9/shaders/shader_geometrypass.frag | 60 +++++++------------------- cw 9/shaders/shader_geometrypass.vert | 28 +++++++++--- cw 9/src/room.hpp | 31 +++++-------- 7 files changed, 81 insertions(+), 107 deletions(-) diff --git a/.vs/grk-project/v16/.suo b/.vs/grk-project/v16/.suo index a098aaad3948e948e7c3599e17dd5157d13147cf..df18e3425916e898d94af4d40e994fca29daadde 100644 GIT binary patch delta 7771 zcmd5>3tW>|mj7-DAwUe_DdlAVd58f+cnC@%K#KU{;S{x2kyv?%2pEV3MM+!RX%!vG zQ9s4%P;6~yr)$MfwL80AoZ1#g$Fci!v^v%zI$LY2WgP9c+o|k1U%miQy1Vn6?e1QG zf9|=jbI(1md-G}eQfhhAb(|T> z9n7*;b`0)GT3x5o6livtEtesoqlP{yc3cAz_38KriyJVhZ!2=}n2)ftu>Yl<7GmEMh#+yygmnd?6tNUhhS=R+JU+V;i7LbjL^Wb1q6V=F zQH!WU)FW0Si18a(HzL*`XuFN=#W7Y%jeF5&MgL6$wvIL+v7ka0CapYZN;01m;V>u7 zC38|O$C^YUb5eV>IfJopv^i;=}Wy!!)8jhfU-#XB^H6LpaPy%Y(tx4<(nQ8y=nFl z962hEqK1}&-ZP|qxhm>1_I-l5B97ryp$uUA8sa+jw;SuM4u<~^L{a8T$>5Z8SSy&7 z1+Gj&?TjQ1+W_~Jg>v!_rDMu^Fnblaa}>N$VxNLkg0xVqe>*?VQT$+Nh5>S25}`4_ zkZM=T1Q%@I=DV>Bnl>7g`zXLh_YqA2;^?Du5DgisdVk7MlmH!rR42msU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C+N~`o92>F_lyJ@q;Bhc%AoFyG#c`GE|uhe E0{*6mPyhe` diff --git a/.vs/grk-project/v16/Browse.VC.db b/.vs/grk-project/v16/Browse.VC.db index 9e4f8b100c28b4dddfe5557e70789797fefd9182..bd06a15e315f5255d848af40bfc33c94558d176b 100644 GIT binary patch delta 6547 zcmY+|30xF)1IF?B|7Uh#SB?ciP!U(f`&=^U$)UV(s#< zB(Zj5`r`0GC6m{eIKHd!Uoktrqs31f8q!doKR`JBlDZ~!?3h_l&?!(G8XUYrJnXEx6+hMA z5*VQl6)T+aPCR}2gAo>oc|14XY4PVWpDg?;Q_tsHT*a^L+OXiVr}VN%AnCsBQJsI- z_KI(ki$hO%sj_(#I+;_=yX-dAUW2B{BN4U$s!Zx>5_X)r#M&qBdC6>c=a! zp7!)8ksc|i-lR&4vZuEZ>CFYzM^|aFwsf)5D$*O_aBY>=v$0EgLAaDsgj?&B?4pc5 zB|SoKi{M^v%3ZhSAwAWrA=BtyDL(-It!}D zRco;hmw4PNT#bY)t1x3mTuB#Qcv(Z-Ypb=XLUeTpxwY6Jdvr@Rx|vG#QTw$A9MNim zRgLynqYJb1vJy*Dbk~aBA^OMrwWbZ^%?Nq3xv73~KYpd;O|^$r-VBg8^{@k4jJ?h& z>zYccrytNFZFTaxRo409a24;a43m{1lIo`pXkBfU@`_bf+He?pP)iQ1=r1c0B*mYk zyrMoO{q)n$#9)2FL9MC1qMfX0Evdf#pcZGVkRMrPMFy4r$4ba=Feb%fn^)_`-}Si6!y>JT#~V z4~=UjAaMcMphORMw?kbdsFHQL|v z)N8(%-1kx~5kAGfca#GnK~cnPk!;FcWbQoke2%%FF!va9KWy$)a}PFmvbp=1JKEgc z&E3h|ZOrX7cN235ncEM$SP|alf#e;^U2f%uxv!Y}yt#id_YdZ-HTO|-A29c4=H4li zEvmPymsk71ym!5M@9XAXW$u;cUdCOlEH)1ons>}K_e^santQUj$D2Fd+@s7r(%i$$ zJ#}6C3C3NfQ-}JN;5m{PXVMBJ*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WErFOZ_AN#QTl1m%I!HaSPY|5n{7FF2N4i*Rac_6PFq@ASdi$IqnEkCYcr_@?Vbiky zy^S{N-`i+ux94FvC*ki)F~{7V2Vsu9J>zlyxji07^S^yO(X4->tV#I95R>8Bae{zq?nYD1*DWLB#X$S(;Hh84_Z(%&L^h zp2e_OWT(eIzEaNntHw*L%XyXZTww6D8B>eY>^S~ZdB>UMYx64wJV(|Ni>xEhll7#E zY#=X?jpRkLiEJh>k(bFUl6_=9@sI=L zAbFDA-|H} z$nWG2a+BO5f6B78`3i#&MRZ~i8?loH#D_SDFYzP(q#@~qA8tg6=Aj;puSZmWM_ zv>MmKcbe9uF#Dmg4fs2m|ACgF|4!CcoD*Dr5`q{KOS+Ia(v{pvx{>ar2kA-TNiUK> zdXqjRktC61(wC%=RML<1Cj&?t8At|^!DI*-N`{f)B%NfC5o9D8MeZV_$=&20axWP} z?jxDxe)0erOR~r~GM-Ez6G=9iL?)9Ql1rwL2gy`2jpPyhaGeY+APJxLD>*fVde$o}SORU1J52;RjJ~^RxzF$ApV4n9iGclmS5p%@W=nkHk^bWGd z=9$-B^u20mh zheZ#O3M&R{Ybh~@U)Q@@W!R+QFV;G&5wgL$jCHPv_23-Q+lkX$aYK)?c4HITtOWO8 ztS$0>lq4-lyFF^9>DCW8A-3xQF#;om^N|v3A&$g}Vbx%5m7T2dK@De;!ur=)PE9$rKz_i6 ze3LQeuS=bM-zy2!T47^1G%c&r#ls1r`HRoS5hGu1SE`kiXof2$riD+J@%VZt87})G zty!vXWV;}%_amZrYS2U}%~zhW3b2c4-WFdgtt88-e6-d|^V58iaIX@dH?+QDZN?cL zY)&7|?zBF`+*6blIA8P}Nwel+EtW{@cdTviP~PXqcNZU0^F9;sb!kq2z5$vPqj}#Q XG^_!|qThqNti#$>oSu)dc69z9fs=3m diff --git a/cw 9/shaders/shader_blur.frag b/cw 9/shaders/shader_blur.frag index 967af0d..5fb620e 100644 --- a/cw 9/shaders/shader_blur.frag +++ b/cw 9/shaders/shader_blur.frag @@ -1,18 +1,32 @@ -#version 430 core -layout (location = 0) out vec3 gPosition; -layout (location = 1) out vec3 gNormal; -layout (location = 2) out vec3 gAlbedo; - +#version 330 core +out vec4 FragColor; + in vec2 TexCoords; -in vec3 FragPos; -in vec3 Normal; + +uniform sampler2D image; + +uniform bool horizontal; +uniform float weight[5] = float[] (0.227027, 0.1945946, 0.1216216, 0.054054, 0.016216); void main() -{ - // store the fragment position vector in the first gbuffer texture - gPosition = FragPos; - // also store the per-fragment normals into the gbuffer - gNormal = normalize(Normal); - // and the diffuse per-fragment color - gAlbedo.rgb = vec3(0.95); +{ + vec2 tex_offset = 1.0 / textureSize(image, 0); // gets size of single texel + vec3 result = texture(image, TexCoords).rgb * weight[0]; // current fragment's contribution + if(horizontal) + { + for(int i = 1; i < 5; ++i) + { + result += texture(image, TexCoords + vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; + result += texture(image, TexCoords - vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; + } + } + else + { + for(int i = 1; i < 5; ++i) + { + result += texture(image, TexCoords + vec2(0.0, tex_offset.y * i)).rgb * weight[i]; + result += texture(image, TexCoords - vec2(0.0, tex_offset.y * i)).rgb * weight[i]; + } + } + FragColor = vec4(result, 1.0); } \ No newline at end of file diff --git a/cw 9/shaders/shader_blur.vert b/cw 9/shaders/shader_blur.vert index 7e73bf3..01dcb0d 100644 --- a/cw 9/shaders/shader_blur.vert +++ b/cw 9/shaders/shader_blur.vert @@ -1,27 +1,14 @@ #version 430 core -layout (location = 0) in vec3 aPos; -layout (location = 1) in vec3 aNormal; -layout (location = 2) in vec2 aTexCoords; +layout(location = 0) in vec3 vertexPosition; +layout(location = 1) in vec3 vertexNormal; +layout(location = 2) in vec2 vertexTexCoord; + -out vec3 FragPos; out vec2 TexCoords; -out vec3 Normal; - -uniform bool invertedNormals; - -uniform mat4 model; -uniform mat4 view; -uniform mat4 projection; void main() { - vec4 viewPos = view * model * vec4(aPos, 1.0); - FragPos = viewPos.xyz; - TexCoords = aTexCoords; - - mat3 normalMatrix = transpose(inverse(mat3(view * model))); - Normal = normalMatrix * (invertedNormals ? -aNormal : aNormal); - - gl_Position = projection * viewPos; -} + gl_Position = vec4(vertexPosition, 1.0); + TexCoords = vertexTexCoord; +} \ No newline at end of file diff --git a/cw 9/shaders/shader_geometrypass.frag b/cw 9/shaders/shader_geometrypass.frag index 28d4cf0..e056787 100644 --- a/cw 9/shaders/shader_geometrypass.frag +++ b/cw 9/shaders/shader_geometrypass.frag @@ -1,48 +1,18 @@ -#version 330 core -out vec4 FragColor; - -in vec2 tc; +#version 430 +layout (location = 0) out vec3 gPosition; +layout (location = 1) out vec3 gNormal; +layout (location = 2) out vec3 gAlbedo; -uniform sampler2D color; -uniform sampler2D highlight; - -float rescale_z(float z){ - float n = 0.05; - float f = 20.; - return (2*n*f/(z*(n-f)+n+f))/f; -} -float weight[5] = float[] (0.227027, 0.1945946, 0.1216216, 0.054054, 0.016216); - -vec4 blur() -{ - vec2 tex_offset = 1.0 / textureSize(color, 0); // gets size of single texel - vec3 result = texture(highlight, tc).rgb * weight[0]; // current fragment's contribution - bool horizontal = true; - if(horizontal) - { - for(int i = 1; i < 5; ++i) - { - result += texture(highlight, tc + vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; - result += texture(highlight, tc - vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; - } - } - else - { - for(int i = 1; i < 5; ++i) - { - result += texture(highlight, tc + vec2(0.0, tex_offset.y * i)).rgb * weight[i]; - result += texture(highlight, tc - vec2(0.0, tex_offset.y * i)).rgb * weight[i]; - } - } - return vec4(result, 1.0); -} +in vec2 TexCoords; +in vec3 FragPos; +in vec3 Normal; void main() -{ - //float depthValue = texture(depthMap, tc).r; - //FragColor = vec4(vec3(rescale_z(depthValue)+0.5), 1.0); - //FragColor = vec4(vec3((depthValue)+0.5), 1.0); - - FragColor = vec4(texture(highlight, tc).rgb+texture(color, tc).rgb,1); - //FragColor = vec4( (texture(color, tc)-0.98)*50); -} \ No newline at end of file +{ + // store the fragment position vector in the first gbuffer texture + gPosition = FragPos; + // also store the per-fragment normals into the gbuffer + gNormal = normalize(Normal); + // and the diffuse per-fragment color + gAlbedo.rgb = vec3(0.95); +} \ No newline at end of file diff --git a/cw 9/shaders/shader_geometrypass.vert b/cw 9/shaders/shader_geometrypass.vert index 64c558f..1644b0b 100644 --- a/cw 9/shaders/shader_geometrypass.vert +++ b/cw 9/shaders/shader_geometrypass.vert @@ -1,14 +1,28 @@ #version 430 core +layout (location = 0) out vec3 vertexPosition; +layout (location = 1) out vec3 vertexNormal; +layout (location = 2) in vec2 vertexTexCoords; -layout(location = 0) in vec3 vertexPosition; -layout(location = 1) in vec3 vertexNormal; -layout(location = 2) in vec2 vertexTexCoord; +out vec3 FragPos; +out vec2 TexCoords; +out vec3 Normal; +uniform bool invertedNormals; -out vec2 tc; +uniform mat4 modelMatrix; +uniform mat3 transformation; + +uniform mat4 view; +uniform mat4 projection; void main() { - tc = vertexTexCoord; - gl_Position = vec4(vertexPosition, 1.0); -} + vec4 viewPos = transformation * vec4(vertexPosition, 1.0); + FragPos = viewPos.xyz; + TexCoord = vertexTexCoords; + + mat3 normalMatrix = transpose(inverse(mat3( * model))); + Normal = normalMatrix * (invertedNormals ? -aNormal : aNormal); + + gl_Position = viewPos; +} \ No newline at end of file diff --git a/cw 9/src/room.hpp b/cw 9/src/room.hpp index 9236968..f6769ea 100644 --- a/cw 9/src/room.hpp +++ b/cw 9/src/room.hpp @@ -253,6 +253,9 @@ void drawSkyBox(Core::RenderContext& context, glm::mat4 modelMatrix) { void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec3 color, float roughness, float metallic) { + geometryPass(modelMatrix); + glUseProgram(program); + glActiveTexture(GL_TEXTURE0); glUniform1i(glGetUniformLocation(program, "depthMap"), 0); glBindTexture(GL_TEXTURE_2D, depthMap); @@ -265,6 +268,7 @@ void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix(); glm::mat4 transformation = viewProjectionMatrix * modelMatrix; + glUniformMatrix4fv(glGetUniformLocation(program, "transformation"), 1, GL_FALSE, (float*)&transformation); glUniformMatrix4fv(glGetUniformLocation(program, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix); @@ -432,31 +436,16 @@ void initgBuffer() glDrawBuffers(3, attachments); } -void geometryPass() +void geometryPass(glm::mat4 modelMatrix) { glBindFramebuffer(GL_FRAMEBUFFER, gBuffer); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glm::mat4 projection = glm::perspective(glm::radians(camera.Zoom), (float)WIDTH / (float)HEIGHT, 0.1f, 50.0f); - glm::mat4 view = camera.GetViewMatrix(); - glm::mat4 model = glm::mat4(1.0f); glUseProgram(programGeometryPass); - shaderGeometryPass.setMat4("projection", projection); - shaderGeometryPass.setMat4("view", view); - // room cube - model = glm::mat4(1.0f); - model = glm::translate(model, glm::vec3(0.0, 7.0f, 0.0f)); - model = glm::scale(model, glm::vec3(7.5f, 7.5f, 7.5f)); - shaderGeometryPass.setMat4("model", model); - shaderGeometryPass.setInt("invertedNormals", 1); // invert normals as we're inside the cube - renderCube(); - shaderGeometryPass.setInt("invertedNormals", 0); - // backpack model on the floor - model = glm::mat4(1.0f); - model = glm::translate(model, glm::vec3(0.0f, 0.5f, 0.0)); - model = glm::rotate(model, glm::radians(-90.0f), glm::vec3(1.0, 0.0, 0.0)); - model = glm::scale(model, glm::vec3(1.0f)); - shaderGeometryPass.setMat4("model", model); - backpack.Draw(shaderGeometryPass); + glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix(); + glm::mat4 transformation = viewProjectionMatrix * modelMatrix; + glUniformMatrix4fv(glGetUniformLocation(programGeometryPass, "transformation"), 1, GL_FALSE, (float*)&transformation); + glUniformMatrix4fv(glGetUniformLocation(programGeometryPass, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix); + glUniform1i(glGetUniformLocation(programGeometryPass, "invertedNormals"), 0); glBindFramebuffer(GL_FRAMEBUFFER, 0); }