poprawki part 2

This commit is contained in:
XsedoX 2023-02-10 21:03:01 +01:00
parent 8bfb2f8823
commit 191448773f
9 changed files with 16 additions and 75 deletions

Binary file not shown.

Binary file not shown.

View File

@ -25,24 +25,14 @@ C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(346,108): warning C4
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(353,92): warning C4305: 'argument': truncation from 'double' to 'T'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(391,2): warning C4305: 'argument': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(438,108): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(354,92): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(395,2): warning C4305: 'argument': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(442,108): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(521,21): warning C4305: '-=': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(523,21): warning C4305: '+=': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(517,21): warning C4305: '-=': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(519,21): warning C4305: '+=': truncation from 'double' to 'float'
Box.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
grk-cw9.vcxproj -> C:\Users\sjule\source\repos\GRK_Project\Debug\grk-cw9.exe

Binary file not shown.

View File

@ -2,11 +2,13 @@
uniform vec3 iResolution;
//uniform vec3 cameraPos;
//uniform vec3 cameraDir;
uniform mat3 camMat;
//uniform mat3 camMat;
uniform sampler2D iChannel1;
uniform samplerCube iChannel0;
uniform float time;
//in float iDate;
in vec4 bubblePosition;
out vec4 fragColor;
@ -86,7 +88,7 @@ float sdf( vec3 p ) {
vec3 n = vec3(sin(time * 0.5), sin(time * 0.3), cos(time * 0.2));
vec3 q = 0.1 * (noise3(p + n) - 0.5);
return length(q + p) - 3.5;
return length(q + p) - 0.5;
}
vec3 fresnel( vec3 rd, vec3 norm, vec3 n2 ) {

View File

@ -5,13 +5,15 @@ layout(location = 1) in vec3 vertexNormal;
layout(location = 2) in vec2 vertexTexCoord;
uniform mat4 transformation;
//uniform float time;
out vec4 bubblePosition;
//out float iDate;
void main()
{
bubblePosition = transformation * vec4(vertexPosition, 1.0);
gl_Position = transformation * vec4(vertexPosition, 1.0);
//vec3 bubbling = sdf(bubblePosition2.xyz);
gl_Position = bubblePosition;
//gl_Position = vec4(vertexPosition, 1.0);
}

View File

@ -244,7 +244,7 @@ void drawBubble(glm::mat4 transformSphere) {
glUniform1f(glGetUniformLocation(programBubble, "time"), time);
//glUniform3f(glGetUniformLocation(programBubble, "cameraPos"), cameraPos.x, cameraPos.y, cameraPos.z);
//glUniform3f(glGetUniformLocation(programBubble, "cameraDir"), cameraDir.x, cameraDir.y, cameraDir.z);
glUniformMatrix3fv(glGetUniformLocation(programBubble, "camMat"), 1, GL_FALSE, (float*)&glm::mat3(viewProjectionMatrix));
//glUniformMatrix3fv(glGetUniformLocation(programBubble, "camMat"), 1, GL_FALSE, (float*)&glm::mat3(bubbleSkyboxViewMatrix/));
Core::SetActiveTexture(bubbleTexture0, "iChannel0", programBubble, 1);
glBindTexture(GL_TEXTURE_CUBE_MAP, bubbleTexture0);
@ -344,6 +344,7 @@ void renderScene(GLFWwindow* window)
//glUseProgram(programSun);
glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
glm::mat4 transformation = viewProjectionMatrix * glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1));
drawBubble(transformation);
/*glUniformMatrix4fv(glGetUniformLocation(programSun, "transformation"), 1, GL_FALSE, (float*)&transformation);
glUniform3f(glGetUniformLocation(programSun, "color"), sunColor.x / 2, sunColor.y / 2, sunColor.z / 2);
glUniform1f(glGetUniformLocation(programSun, "exposition"), exposition);
@ -362,11 +363,11 @@ void renderScene(GLFWwindow* window)
drawObjectPBR(models::deskContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
drawObjectPBR(models::doorContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
drawObjectPBR(models::drawerContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
drawObjectPBR(models::marbleBustContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f);
//drawObjectPBR(models::marbleBustContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f);
drawObjectPBR(models::materaceContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
drawObjectPBR(models::pencilsContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f);
drawObjectPBR(models::planeContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
drawObjectPBR(models::roomContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
//drawObjectPBR(models::roomContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceshipDir, glm::vec3(0.f, 1.f, 0.f)));

View File

@ -3,72 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw2", "cw 2\grk-cw2.vcxproj", "{B4031E08-6274-4FFD-B41C-F8EA29E977FB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw1", "cw 1\grk-cw1.vcxproj", "{1B448102-E76C-4347-BDC7-40D02A567DB6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw3", "cw 3\grk-cw3.vcxproj", "{F201D210-49F1-4EFF-B8A0-56D56880D14B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw4", "cw 4\grk-cw4.vcxproj", "{D7858112-9412-4E7E-AB73-A911604592EC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw5", "cw 5\grk-cw5.vcxproj", "{7B84D06D-946D-4DCB-BD1A-B5635B0F83F0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw6", "cw 6\grk-cw6.vcxproj", "{3952C396-B1C6-44CD-96DD-C1AC15D32978}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw8", "cw 8\grk-cw8.vcxproj", "{6D813233-7D21-4888-944E-8E3CCAC3EFD3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw9", "cw 9\grk-cw9.vcxproj", "{5BACD057-4B83-4CB6-A367-40A10BCE2149}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw7", "cw 7\grk-cw7.vcxproj", "{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grk-cw10", "cw 11\grk-cw10.vcxproj", "{8DF85446-560F-459F-BB86-0477FCA30165}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B4031E08-6274-4FFD-B41C-F8EA29E977FB}.Debug|x86.ActiveCfg = Debug|Win32
{B4031E08-6274-4FFD-B41C-F8EA29E977FB}.Debug|x86.Build.0 = Debug|Win32
{B4031E08-6274-4FFD-B41C-F8EA29E977FB}.Release|x86.ActiveCfg = Release|Win32
{B4031E08-6274-4FFD-B41C-F8EA29E977FB}.Release|x86.Build.0 = Release|Win32
{1B448102-E76C-4347-BDC7-40D02A567DB6}.Debug|x86.ActiveCfg = Debug|Win32
{1B448102-E76C-4347-BDC7-40D02A567DB6}.Debug|x86.Build.0 = Debug|Win32
{1B448102-E76C-4347-BDC7-40D02A567DB6}.Release|x86.ActiveCfg = Release|Win32
{1B448102-E76C-4347-BDC7-40D02A567DB6}.Release|x86.Build.0 = Release|Win32
{F201D210-49F1-4EFF-B8A0-56D56880D14B}.Debug|x86.ActiveCfg = Debug|Win32
{F201D210-49F1-4EFF-B8A0-56D56880D14B}.Debug|x86.Build.0 = Debug|Win32
{F201D210-49F1-4EFF-B8A0-56D56880D14B}.Release|x86.ActiveCfg = Release|Win32
{F201D210-49F1-4EFF-B8A0-56D56880D14B}.Release|x86.Build.0 = Release|Win32
{D7858112-9412-4E7E-AB73-A911604592EC}.Debug|x86.ActiveCfg = Debug|Win32
{D7858112-9412-4E7E-AB73-A911604592EC}.Debug|x86.Build.0 = Debug|Win32
{D7858112-9412-4E7E-AB73-A911604592EC}.Release|x86.ActiveCfg = Release|Win32
{D7858112-9412-4E7E-AB73-A911604592EC}.Release|x86.Build.0 = Release|Win32
{7B84D06D-946D-4DCB-BD1A-B5635B0F83F0}.Debug|x86.ActiveCfg = Debug|Win32
{7B84D06D-946D-4DCB-BD1A-B5635B0F83F0}.Debug|x86.Build.0 = Debug|Win32
{7B84D06D-946D-4DCB-BD1A-B5635B0F83F0}.Release|x86.ActiveCfg = Release|Win32
{7B84D06D-946D-4DCB-BD1A-B5635B0F83F0}.Release|x86.Build.0 = Release|Win32
{3952C396-B1C6-44CD-96DD-C1AC15D32978}.Debug|x86.ActiveCfg = Debug|Win32
{3952C396-B1C6-44CD-96DD-C1AC15D32978}.Debug|x86.Build.0 = Debug|Win32
{3952C396-B1C6-44CD-96DD-C1AC15D32978}.Release|x86.ActiveCfg = Release|Win32
{3952C396-B1C6-44CD-96DD-C1AC15D32978}.Release|x86.Build.0 = Release|Win32
{6D813233-7D21-4888-944E-8E3CCAC3EFD3}.Debug|x86.ActiveCfg = Debug|Win32
{6D813233-7D21-4888-944E-8E3CCAC3EFD3}.Debug|x86.Build.0 = Debug|Win32
{6D813233-7D21-4888-944E-8E3CCAC3EFD3}.Release|x86.ActiveCfg = Release|Win32
{6D813233-7D21-4888-944E-8E3CCAC3EFD3}.Release|x86.Build.0 = Release|Win32
{5BACD057-4B83-4CB6-A367-40A10BCE2149}.Debug|x86.ActiveCfg = Debug|Win32
{5BACD057-4B83-4CB6-A367-40A10BCE2149}.Debug|x86.Build.0 = Debug|Win32
{5BACD057-4B83-4CB6-A367-40A10BCE2149}.Release|x86.ActiveCfg = Release|Win32
{5BACD057-4B83-4CB6-A367-40A10BCE2149}.Release|x86.Build.0 = Release|Win32
{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}.Debug|x86.ActiveCfg = Debug|Win32
{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}.Debug|x86.Build.0 = Debug|Win32
{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}.Release|x86.ActiveCfg = Release|Win32
{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}.Release|x86.Build.0 = Release|Win32
{8DF85446-560F-459F-BB86-0477FCA30165}.Debug|x86.ActiveCfg = Debug|Win32
{8DF85446-560F-459F-BB86-0477FCA30165}.Debug|x86.Build.0 = Debug|Win32
{8DF85446-560F-459F-BB86-0477FCA30165}.Release|x86.ActiveCfg = Release|Win32
{8DF85446-560F-459F-BB86-0477FCA30165}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE