corrected shadows
This commit is contained in:
commit
a6f78ec875
Binary file not shown.
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
main.cpp
|
main.cpp
|
||||||
|
<<<<<<< HEAD
|
||||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
|
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY'
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(106,30): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(106,30): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
@ -6,33 +7,62 @@ C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(138,38): warnin
|
|||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(161,16): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(161,16): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(227,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(227,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(242,98): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(242,98): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
=======
|
||||||
|
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(100,30): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(132,38): warning C4305: '=': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(155,16): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(224,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(239,98): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
>>>>>>> master
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
|
<<<<<<< HEAD
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(245,68): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(245,68): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
=======
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(242,68): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
>>>>>>> master
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
|
<<<<<<< HEAD
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(283,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(283,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(330,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(330,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(339,108): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(339,108): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
=======
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(276,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(323,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(332,108): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
>>>>>>> master
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
|
<<<<<<< HEAD
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(347,87): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(347,87): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
=======
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(340,87): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
>>>>>>> master
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
|
<<<<<<< HEAD
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(347,223): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(347,223): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(350,59): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(350,59): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
=======
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(340,223): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(343,59): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
|
>>>>>>> master
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
|
<<<<<<< HEAD
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(351,37): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(351,37): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(389,2): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(389,2): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(396,20): warning C4018: '<': signed/unsigned mismatch
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(396,20): warning C4018: '<': signed/unsigned mismatch
|
||||||
@ -44,6 +74,19 @@ C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(647,21): warnin
|
|||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(649,21): warning C4305: '+=': truncation from 'double' to 'float'
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(649,21): warning C4305: '+=': truncation from 'double' to 'float'
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(677,21): warning C4018: '<': signed/unsigned mismatch
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(677,21): warning C4018: '<': signed/unsigned mismatch
|
||||||
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(679,49): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
|
C:\Users\prima\Documents\JAVA\GRK_game_scene\cw 9\src\ex_9_1.hpp(679,49): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
|
||||||
|
=======
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(344,37): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(375,2): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(382,20): warning C4018: '<': signed/unsigned mismatch
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(384,47): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(385,48): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(468,21): warning C4018: '<': signed/unsigned mismatch
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(470,49): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(627,21): warning C4305: '-=': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(629,21): warning C4305: '+=': truncation from 'double' to 'float'
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(657,21): warning C4018: '<': signed/unsigned mismatch
|
||||||
|
C:\Users\arciom\Desktop\GRK_game_scene\cw 9\src\ex_9_1.hpp(659,49): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
|
||||||
|
>>>>>>> master
|
||||||
Box.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
|
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
|
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
|
||||||
grk-cw9.vcxproj -> C:\Users\prima\Documents\JAVA\GRK_game_scene\Debug\grk-cw9.exe
|
grk-cw9.vcxproj -> C:\Users\prima\Documents\JAVA\GRK_game_scene\Debug\grk-cw9.exe
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -197,6 +197,9 @@ void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec
|
|||||||
glUniform3f(glGetUniformLocation(program, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
|
glUniform3f(glGetUniformLocation(program, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
|
||||||
glUniform3f(glGetUniformLocation(program, "lightColor"), pointlightColor.x, pointlightColor.y, pointlightColor.z);
|
glUniform3f(glGetUniformLocation(program, "lightColor"), pointlightColor.x, pointlightColor.y, pointlightColor.z);
|
||||||
|
|
||||||
|
/*glUniform3f(glGetUniformLocation(program, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
|
||||||
|
glUniform3f(glGetUniformLocation(program, "lightColor"), pointlightColor.x, pointlightColor.y, pointlightColor.z);*/
|
||||||
|
|
||||||
glUniform3f(glGetUniformLocation(program, "spotlightConeDir"), spotlightConeDir.x, spotlightConeDir.y, spotlightConeDir.z);
|
glUniform3f(glGetUniformLocation(program, "spotlightConeDir"), spotlightConeDir.x, spotlightConeDir.y, spotlightConeDir.z);
|
||||||
glUniform3f(glGetUniformLocation(program, "spotlightPos"), spotlightPos.x, spotlightPos.y, spotlightPos.z);
|
glUniform3f(glGetUniformLocation(program, "spotlightPos"), spotlightPos.x, spotlightPos.y, spotlightPos.z);
|
||||||
glUniform3f(glGetUniformLocation(program, "spotlightColor"), spotlightColor.x, spotlightColor.y, spotlightColor.z);
|
glUniform3f(glGetUniformLocation(program, "spotlightColor"), spotlightColor.x, spotlightColor.y, spotlightColor.z);
|
||||||
@ -204,7 +207,7 @@ void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec
|
|||||||
|
|
||||||
|
|
||||||
//For shadows
|
//For shadows
|
||||||
glm::mat4 lightVPSun = glm::ortho(-10.f, 10.f, -10.f, 10.f, 1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
glm::mat4 lightVPSun = glm::ortho(-3.f, 2.3f, -1.3f, 3.f, -1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
||||||
glUniformMatrix4fv(glGetUniformLocation(program, "LightVPSun"), 1, GL_FALSE, (float*)&lightVPSun);
|
glUniformMatrix4fv(glGetUniformLocation(program, "LightVPSun"), 1, GL_FALSE, (float*)&lightVPSun);
|
||||||
glUniform1i(glGetUniformLocation(program, "depthMapSun"), 2);
|
glUniform1i(glGetUniformLocation(program, "depthMapSun"), 2);
|
||||||
glActiveTexture(GL_TEXTURE0 + 2);
|
glActiveTexture(GL_TEXTURE0 + 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user