diff --git a/grk/project/GameUtils.h b/grk/project/GameUtils.h index a1b7ebb..a4c7cea 100644 --- a/grk/project/GameUtils.h +++ b/grk/project/GameUtils.h @@ -1,4 +1,5 @@ #include +#include #include "Sun.h" #include "Bullet.h" #include "src/Shader_Loader.h" @@ -12,10 +13,12 @@ private: { this->suns = new std::list(); this->shaderLoader = new Core::Shader_Loader(); + this->planetsTextures = new std::list>(); } std::list* suns; std::list bullets; float aspectRatio; + std::list>* planetsTextures; public: @@ -35,6 +38,10 @@ public: return suns; } + std::list>* getPlanetsTextures() { + return planetsTextures; + } + static GameUtils* getInstance() { static GameUtils instance; // Jedna i jedyna instancja diff --git a/grk/project/Planet.h b/grk/project/Planet.h index 13749a5..4208920 100644 --- a/grk/project/Planet.h +++ b/grk/project/Planet.h @@ -2,6 +2,7 @@ #include "glm.hpp" #include "ext.hpp" #include "src/Render_Utils.h" +#include #pragma once class Planet : public GameObject @@ -14,15 +15,17 @@ private: float scale; glm::vec3 position; glm::mat4 positionMatrix; + std::tuple texture; public: - Planet(GameObject* center, float distanceFromCenter, float rotationSpeed, float scale, Core::RenderContext sphereContext) { + Planet(GameObject* center, float distanceFromCenter, float rotationSpeed, float scale, Core::RenderContext sphereContext, std::tuple texture) { this->center = center; this->distanceFromCenter = distanceFromCenter; this->rotationSpeed = rotationSpeed; this->sphereContext = sphereContext; this->scale = scale; this->position = glm::vec3(0); + this->texture = texture; } glm::mat4 getPositionMatrix() override { @@ -37,6 +40,6 @@ public: float rotationAngle = glm::radians(time * rotationSpeed); positionMatrix = center->getPositionMatrix() * glm::eulerAngleY(time * rotationSpeed) * glm::translate(glm::vec3(distanceFromCenter, 0, 0)); glm::mat4 modelMatrix = positionMatrix * glm::scale(glm::vec3(scale)); - Core::drawObjectPBR(sphereContext, modelMatrix, glm::vec3(0.2, 0.7, 0.3), 0.3, 0.0, program); + Core::drawObjectPBRTexture(sphereContext, modelMatrix, std::get<0>(texture), std::get<1>(texture), 0.3, 0.0, program); } }; \ No newline at end of file diff --git a/grk/project/draw_obj_text_pbr.frag b/grk/project/draw_obj_text_pbr.frag new file mode 100644 index 0000000..115c456 --- /dev/null +++ b/grk/project/draw_obj_text_pbr.frag @@ -0,0 +1,123 @@ +#version 430 core + +float AMBIENT = 0.03; +float PI = 3.14; + +uniform sampler2D depthMap; + +uniform vec3 cameraPos; + +uniform sampler2D colorTexture; + +uniform vec3 lightPositions[100]; +uniform vec3 lightColors[100]; + +uniform vec3 spotlightPos; +uniform vec3 spotlightColor; +uniform vec3 spotlightConeDir; +uniform vec3 spotlightPhi; + +uniform float metallic; +uniform float roughness; + +uniform float exposition; + +in vec3 vecNormal; +in vec3 worldPos; + +out vec4 outColor; + +in vec3 viewDirTS; +in vec3 lightDirTS[4]; +in vec3 spotlightDirTS; +in vec3 sunDirTS; + +in vec2 vecTextCoord; + +float DistributionGGX(vec3 normal, vec3 H, float roughness){ + float a = roughness*roughness; + float a2 = a*a; + float NdotH = max(dot(normal, H), 0.0); + float NdotH2 = NdotH*NdotH; + + float num = a2; + float denom = (NdotH2 * (a2 - 1.0) + 1.0); + denom = PI * denom * denom; + + return num / denom; +} +float GeometrySchlickGGX(float NdotV, float roughness){ + float r = (roughness + 1.0); + float k = (r*r) / 8.0; + + float num = NdotV; + float denom = NdotV * (1.0 - k) + k; + + return num / denom; +} +float GeometrySmith(vec3 normal, vec3 V, vec3 lightDir, float roughness){ + float NdotV = max(dot(normal, V), 0.0); + float NdotL = max(dot(normal, lightDir), 0.0); + float ggx2 = GeometrySchlickGGX(NdotV, roughness); + float ggx1 = GeometrySchlickGGX(NdotL, roughness); + + return ggx1 * ggx2; +} +vec3 fresnelSchlick(float cosTheta, vec3 F0){ + return F0 + (1.0 - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0); +} + +vec3 PBRLight(vec3 lightDir, vec3 radiance, vec3 normal, vec3 V, vec3 colorTex){ + float diffuse=max(0,dot(normal,lightDir)); + + vec3 F0 = vec3(0.04); + F0 = mix(F0, colorTex, metallic); + + vec3 H = normalize(V + lightDir); + + float NDF = DistributionGGX(normal, H, roughness); + float G = GeometrySmith(normal, V, lightDir, roughness); + vec3 F = fresnelSchlick(max(dot(H, V), 0.0), F0); + + vec3 kS = F; + vec3 kD = vec3(1.0) - kS; + kD *= 1.0 - metallic; + + vec3 numerator = NDF * G * F; + float denominator = 4.0 * max(dot(normal, V), 0.0) * max(dot(normal, lightDir), 0.0) + 0.0001; + vec3 specular = numerator / denominator; + + float NdotL = max(dot(normal, lightDir), 0.0); + return (kD * colorTex / PI + specular) * radiance * NdotL; +} + + +void main() +{ + vec3 normal = normalize(vecNormal); + + vec3 viewDir = normalize(cameraPos-worldPos); + + vec3 lightDirs[100]; + vec3 texColor = texture(colorTexture, vecTextCoord).rgb; + vec3 ambient = AMBIENT * texColor; + vec3 ilumination = ambient; + + for (int i = 0; i < 100; ++i) { + lightDirs[i] = normalize(lightPositions[i] - worldPos); + vec3 attenuatedlightColor = lightColors[i] / pow(length(lightPositions[i] - worldPos), 2); + ilumination = ilumination+PBRLight(lightDirs[i], attenuatedlightColor * 300, normal, viewDir, texColor); + } + + + + vec3 spotlightDir= normalize(spotlightPos-worldPos); + + + float angle_atenuation = clamp((dot(-normalize(spotlightPos-worldPos),spotlightConeDir)-0.5)*3,0,1); + vec3 attenuatedlightColor = angle_atenuation*spotlightColor/pow(length(spotlightPos-worldPos),2); + ilumination=ilumination+PBRLight(spotlightDir,attenuatedlightColor,normal,viewDir, texColor); + + + outColor = vec4(vec3(1.0) - exp(-ilumination*exposition),1); +} diff --git a/grk/project/draw_obj_text_pbr.vert b/grk/project/draw_obj_text_pbr.vert new file mode 100644 index 0000000..684cb4c --- /dev/null +++ b/grk/project/draw_obj_text_pbr.vert @@ -0,0 +1,46 @@ +#version 430 core + +layout(location = 0) in vec3 vertexPosition; +layout(location = 1) in vec3 vertexNormal; +layout(location = 2) in vec2 vertexTexCoord; +layout(location = 3) in vec3 vertexTangent; +layout(location = 4) in vec3 vertexBitangent; + +uniform mat4 transformation; +uniform mat4 modelMatrix; + +out vec3 vecNormal; +out vec3 worldPos; + +uniform vec3 lightsPositions[100]; +uniform vec3 spotlightPos; +uniform vec3 cameraPos; + +out vec3 viewDirTS; +out vec3 lightDirTS[100]; +out vec3 spotlightDirTS; +out vec2 vecTextCoord; + +void main() +{ + worldPos = (modelMatrix* vec4(vertexPosition,1)).xyz; + vecNormal = (modelMatrix* vec4(vertexNormal,0)).xyz; + gl_Position = transformation * vec4(vertexPosition, 1.0); + + vec3 w_tangent = normalize(mat3(modelMatrix)*vertexTangent); + vec3 w_bitangent = normalize(mat3(modelMatrix)*vertexBitangent); + mat3 TBN = transpose(mat3(w_tangent, w_bitangent, vecNormal)); + + vec3 V = normalize(cameraPos-worldPos); + viewDirTS = TBN*V; + + for (int i = 0; i < 100; ++i) { + vec3 L = normalize(lightsPositions[i]-worldPos); + lightDirTS[i] = TBN*L; + } + + vec3 SL = normalize(spotlightPos-worldPos); + spotlightDirTS = TBN*SL; + + vecTextCoord = vertexTexCoord; +} diff --git a/grk/project/grk-project.vcxproj b/grk/project/grk-project.vcxproj index 16a703f..27376ef 100644 --- a/grk/project/grk-project.vcxproj +++ b/grk/project/grk-project.vcxproj @@ -45,6 +45,8 @@ + + @@ -55,6 +57,8 @@ + + {5BACD057-4B83-4CB6-A367-40A10BCE2149} diff --git a/grk/project/grk-project.vcxproj.filters b/grk/project/grk-project.vcxproj.filters index c8486a9..c76896c 100644 --- a/grk/project/grk-project.vcxproj.filters +++ b/grk/project/grk-project.vcxproj.filters @@ -139,5 +139,19 @@ Shader Files + + + + Shader Files + + + Shader Files + + + Shader Files + + + Shader Files + \ No newline at end of file diff --git a/grk/project/shaders/draw_obj_text_pbr.frag b/grk/project/shaders/draw_obj_text_pbr.frag new file mode 100644 index 0000000..b56ef0f --- /dev/null +++ b/grk/project/shaders/draw_obj_text_pbr.frag @@ -0,0 +1,123 @@ +#version 430 core + +float AMBIENT = 0.03; +float PI = 3.14; + +uniform sampler2D depthMap; + +uniform vec3 cameraPos; + +uniform sampler2D colorTexture; + +uniform vec3 lightPositions[100]; +uniform vec3 lightColors[100]; + +uniform vec3 spotlightPos; +uniform vec3 spotlightColor; +uniform vec3 spotlightConeDir; +uniform vec3 spotlightPhi; + +uniform float metallic; +uniform float roughness; + +uniform float exposition; + +in vec3 vecNormal; +in vec3 worldPos; + +out vec4 outColor; + + +in vec3 viewDirTS; +in vec3 lightDirTS[4]; +in vec3 spotlightDirTS; +in vec3 sunDirTS; + +in vec3 test; + +float DistributionGGX(vec3 normal, vec3 H, float roughness){ + float a = roughness*roughness; + float a2 = a*a; + float NdotH = max(dot(normal, H), 0.0); + float NdotH2 = NdotH*NdotH; + + float num = a2; + float denom = (NdotH2 * (a2 - 1.0) + 1.0); + denom = PI * denom * denom; + + return num / denom; +} +float GeometrySchlickGGX(float NdotV, float roughness){ + float r = (roughness + 1.0); + float k = (r*r) / 8.0; + + float num = NdotV; + float denom = NdotV * (1.0 - k) + k; + + return num / denom; +} +float GeometrySmith(vec3 normal, vec3 V, vec3 lightDir, float roughness){ + float NdotV = max(dot(normal, V), 0.0); + float NdotL = max(dot(normal, lightDir), 0.0); + float ggx2 = GeometrySchlickGGX(NdotV, roughness); + float ggx1 = GeometrySchlickGGX(NdotL, roughness); + + return ggx1 * ggx2; +} +vec3 fresnelSchlick(float cosTheta, vec3 F0){ + return F0 + (1.0 - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0); +} + +vec3 PBRLight(vec3 lightDir, vec3 radiance, vec3 normal, vec3 V){ + float diffuse=max(0,dot(normal,lightDir)); + + vec3 F0 = vec3(0.04); + F0 = mix(F0, texture(colorTexture, vec2(0.5, 0.5)).rgb, metallic); + + vec3 H = normalize(V + lightDir); + + float NDF = DistributionGGX(normal, H, roughness); + float G = GeometrySmith(normal, V, lightDir, roughness); + vec3 F = fresnelSchlick(max(dot(H, V), 0.0), F0); + + vec3 kS = F; + vec3 kD = vec3(1.0) - kS; + kD *= 1.0 - metallic; + + vec3 numerator = NDF * G * F; + float denominator = 4.0 * max(dot(normal, V), 0.0) * max(dot(normal, lightDir), 0.0) + 0.0001; + vec3 specular = numerator / denominator; + + float NdotL = max(dot(normal, lightDir), 0.0); + return (kD * texture(colorTexture, vec2(0.5, 0.5)).rgb / PI + specular) * radiance * NdotL; +} + + +void main() +{ + vec3 normal = normalize(vecNormal); + + vec3 viewDir = normalize(cameraPos-worldPos); + + vec3 lightDirs[4]; + vec3 ambient = AMBIENT * texture(colorTexture, vec2(0.5, 0.5)).rgb; + vec3 ilumination = ambient; + + for (int i = 0; i < 100; ++i) { + lightDirs[i] = normalize(lightPositions[i] - worldPos); + vec3 attenuatedlightColor = lightColors[i] / pow(length(lightPositions[i] - worldPos), 2); + ilumination = ilumination+PBRLight(lightDirs[i], attenuatedlightColor * 300, normal, viewDir); + } + + + + vec3 spotlightDir= normalize(spotlightPos-worldPos); + + + float angle_atenuation = clamp((dot(-normalize(spotlightPos-worldPos),spotlightConeDir)-0.5)*3,0,1); + vec3 attenuatedlightColor = angle_atenuation*spotlightColor/pow(length(spotlightPos-worldPos),2); + ilumination=ilumination+PBRLight(spotlightDir,attenuatedlightColor,normal,viewDir); + + + outColor = vec4(vec3(1.0) - exp(-ilumination*exposition),1); +} diff --git a/grk/project/shaders/draw_obj_text_pbr.vert b/grk/project/shaders/draw_obj_text_pbr.vert new file mode 100644 index 0000000..35f6edf --- /dev/null +++ b/grk/project/shaders/draw_obj_text_pbr.vert @@ -0,0 +1,43 @@ +#version 430 core + +layout(location = 0) in vec3 vertexPosition; +layout(location = 1) in vec3 vertexNormal; +layout(location = 2) in vec2 vertexTexCoord; +layout(location = 3) in vec3 vertexTangent; +layout(location = 4) in vec3 vertexBitangent; + +uniform mat4 transformation; +uniform mat4 modelMatrix; + +out vec3 vecNormal; +out vec3 worldPos; + +uniform vec3 lightsPositions[100]; +uniform vec3 spotlightPos; +uniform vec3 cameraPos; + +out vec3 viewDirTS; +out vec3 lightDirTS[100]; +out vec3 spotlightDirTS; + +void main() +{ + worldPos = (modelMatrix* vec4(vertexPosition,1)).xyz; + vecNormal = (modelMatrix* vec4(vertexNormal,0)).xyz; + gl_Position = transformation * vec4(vertexPosition, 1.0); + + vec3 w_tangent = normalize(mat3(modelMatrix)*vertexTangent); + vec3 w_bitangent = normalize(mat3(modelMatrix)*vertexBitangent); + mat3 TBN = transpose(mat3(w_tangent, w_bitangent, vecNormal)); + + vec3 V = normalize(cameraPos-worldPos); + viewDirTS = TBN*V; + + for (int i = 0; i < 100; ++i) { + vec3 L = normalize(lightsPositions[i]-worldPos); + lightDirTS[i] = TBN*L; + } + + vec3 SL = normalize(spotlightPos-worldPos); + spotlightDirTS = TBN*SL; +} diff --git a/grk/project/src/Render_Utils.cpp b/grk/project/src/Render_Utils.cpp index 739d977..c74832b 100644 --- a/grk/project/src/Render_Utils.cpp +++ b/grk/project/src/Render_Utils.cpp @@ -9,6 +9,7 @@ #include #include "../GameUtils.h" #include "../Spaceship.h" +#include "./Texture.h" @@ -168,6 +169,44 @@ void Core::drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, gl std::list* suns = GameUtils::getInstance()->getSuns(); + glm::vec3 lightsPositions[8]; + glm::vec3 lightsColors[8]; + + int i = 0; + for (Sun* sun : *suns) { + lightsPositions[i] = sun->getPosition(); + lightsColors[i] = sun->getColor(); + ++i; + } + + glUniform3fv(glGetUniformLocation(program, "lightPositions"), 8, glm::value_ptr(lightsPositions[0])); + glUniform3fv(glGetUniformLocation(program, "lightColors"), 8, glm::value_ptr(lightsColors[0])); + + glUniform3f(glGetUniformLocation(program, "spotlightConeDir"), spaceship->spotlightConeDir.x, spaceship->spotlightConeDir.y, spaceship->spotlightConeDir.z); + glUniform3f(glGetUniformLocation(program, "spotlightPos"), spaceship->spotlightPos.x, spaceship->spotlightPos.y, spaceship->spotlightPos.z); + glUniform3f(glGetUniformLocation(program, "spotlightColor"), spaceship->spotlightColor.x, spaceship->spotlightColor.y, spaceship->spotlightColor.z); + glUniform1f(glGetUniformLocation(program, "spotlightPhi"), spaceship->spotlightPhi); + Core::DrawContext(context); +} + +void Core::drawObjectPBRTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint texture, GLuint normal, float roughness, float metallic, GLuint program) { + Spaceship* spaceship = Spaceship::getInstance(); + glm::mat4 viewProjectionMatrix = Core::createPerspectiveMatrix() * spaceship->createCameraMatrix(); + glm::mat4 transformation = viewProjectionMatrix * modelMatrix; + Core::SetActiveTexture(texture, "colorTexture", program, 0); + glUniformMatrix4fv(glGetUniformLocation(program, "transformation"), 1, GL_FALSE, (float*)&transformation); + glUniformMatrix4fv(glGetUniformLocation(program, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix); + + glUniform1f(glGetUniformLocation(program, "exposition"), 1.f); + + glUniform1f(glGetUniformLocation(program, "roughness"), roughness); + glUniform1f(glGetUniformLocation(program, "metallic"), metallic); + glUniform1i(glGetUniformLocation(program, "colorTexture"), 0); + + glUniform3f(glGetUniformLocation(program, "cameraPos"), spaceship->cameraPos.x, spaceship->cameraPos.y, spaceship->cameraPos.z); + + std::list* suns = GameUtils::getInstance()->getSuns(); + glm::vec3 lightsPositions[100]; glm::vec3 lightsColors[100]; diff --git a/grk/project/src/Render_Utils.h b/grk/project/src/Render_Utils.h index c537f37..dd39fc8 100644 --- a/grk/project/src/Render_Utils.h +++ b/grk/project/src/Render_Utils.h @@ -73,5 +73,6 @@ namespace Core glm::mat4 createPerspectiveMatrix(); void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec3 color, float roughness, float metallic, GLuint program); + void drawObjectPBRTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint texture, GLuint normal, float roughness, float metallic, GLuint program); void loadModelToContext(std::string path, Core::RenderContext& context); } \ No newline at end of file diff --git a/grk/project/src/Texture.cpp b/grk/project/src/Texture.cpp index 0e1a352..34577d7 100644 --- a/grk/project/src/Texture.cpp +++ b/grk/project/src/Texture.cpp @@ -68,7 +68,8 @@ GLuint Core::LoadCubemap(const std::vector& faces) void Core::SetActiveTexture(GLuint textureID, const char * shaderVariableName, GLuint programID, int textureUnit) { - glUniform1i(glGetUniformLocation(programID, shaderVariableName), textureUnit); + int location = glGetUniformLocation(programID, shaderVariableName); + glUniform1i(location, textureUnit); glActiveTexture(GL_TEXTURE0 + textureUnit); glBindTexture(GL_TEXTURE_2D, textureID); } diff --git a/grk/project/src/ex_9_1.hpp b/grk/project/src/ex_9_1.hpp index 0aec084..c72e650 100644 --- a/grk/project/src/ex_9_1.hpp +++ b/grk/project/src/ex_9_1.hpp @@ -46,6 +46,7 @@ GLuint programSun; GLuint programTest; GLuint programTex; GLuint programCubemap; +GLuint programTextPBR; std::list planets; Sun* sun; @@ -61,6 +62,7 @@ float deltaTime = 0.f; Spaceship* spaceship = Spaceship::getInstance(); void createSolarSystem(glm::vec3 sunPos, float sunScale, float* planetSizes, int numberOfPlanets, float planetsDistance, float planetSpeedCoef); +void loadPlanetsTexturesWithNormals(); void updateDeltaTime(float time) { if (lastTime < 0) { lastTime = time; @@ -99,12 +101,14 @@ void renderScene(GLFWwindow* window) sun->draw(); } - glUseProgram(program); + glUseProgram(programTextPBR); for (Planet* p : planets) { - p->draw(time, program); + p->draw(time, programTextPBR); } + glUseProgram(program); + spaceship->renderBullets(glfwGetTime(), program); //drawObjectPBR(sphereContext, glm::translate(pointlightPos) * glm::scale(glm::vec3(1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(10.f, 0, 0)) * glm::scale(glm::vec3(0.3f)), glm::vec3(0.2, 0.7, 0.3), 0.3, 0.0, program); @@ -147,13 +151,21 @@ void createGalaxy(glm::vec3 galaxyPosition) { createSolarSystem(galaxyPosition + glm::vec3(100, 20, -50), 5, planetsSizes3, 2, 25.f, 0.2f); } +std::tuple getRandomPlanetTexture() { + std::list>* planetsTextures = GameUtils::getInstance()->getPlanetsTextures(); + std::srand(static_cast(std::time(nullptr))); + int index = std::rand() % planetsTextures->size(); + auto iterator = std::next(planetsTextures->begin(), 0); + return *iterator; +} + void createSolarSystem(glm::vec3 sunPos, float sunScale, float* planetSizes, int numberOfPlanets, float planetsDistance, float planetSpeedCoef) { GameUtils* gu = GameUtils::getInstance(); sun = new Sun(programSun, models::sphereContext, sunPos, glm::vec3(-0.93633f, 0.351106, 0.003226f), glm::vec3(0.9f, 0.9f, 0.7f) * 5, sunScale); gu->getSuns()->push_back(sun); for (int i = 0; i < numberOfPlanets; i++) { float distanceFromSum = (i + 1) * planetsDistance; - Planet* planet = new Planet(sun, distanceFromSum, i * 0.1f + planetSpeedCoef, planetSizes[i], models::sphereContext); + Planet* planet = new Planet(sun, distanceFromSum, i * 0.1f + planetSpeedCoef, planetSizes[i], models::sphereContext, getRandomPlanetTexture()); planets.push_back(planet); } } @@ -169,6 +181,7 @@ void init(GLFWwindow* window) programTest = gameUtils->shaderLoader->CreateProgram("shaders/test.vert", "shaders/test.frag"); programSun = gameUtils->shaderLoader->CreateProgram("shaders/shader_8_sun.vert", "shaders/shader_8_sun.frag"); programCubemap = gameUtils->shaderLoader->CreateProgram("shaders/shader_skybox.vert", "shaders/shader_skybox.frag"); + programTextPBR = gameUtils->shaderLoader->CreateProgram("shaders/draw_obj_text_pbr.vert", "shaders/draw_obj_text_pbr.frag"); loadModelToContext("./models/marbleBust.obj", models::marbleBustContext); loadModelToContext("./models/spaceship.obj", models::spaceshipContext); @@ -186,10 +199,25 @@ void init(GLFWwindow* window) }; texture::cubemapTexture = Core::LoadCubemap(cubeFaces); + loadPlanetsTexturesWithNormals(); + createSuns(); } +void loadPlanetsTexturesWithNormals() +{ + std::list>* planetsTextures = GameUtils::getInstance()->getPlanetsTextures(); + std::tuple p1 = std::tuple(Core::LoadTexture("./textures/planets/lol.png"), Core::LoadTexture("./textures/planets/planet1normal.png")); + std::tuple p2 = std::tuple(Core::LoadTexture("./textures/planets/planet2.png"), Core::LoadTexture("./textures/planets/planet2normal.png")); + std::tuple p3 = std::tuple(Core::LoadTexture("./textures/planets/planet3.png"), Core::LoadTexture("./textures/planets/planet3normal.png")); + std::tuple p4 = std::tuple(Core::LoadTexture("./textures/planets/planet4.png"), Core::LoadTexture("./textures/planets/planet4normal.png")); + planetsTextures->push_back(p1); + planetsTextures->push_back(p2); + planetsTextures->push_back(p3); + planetsTextures->push_back(p4); +} + void shutdown(GLFWwindow* window) { GameUtils::getInstance()->shaderLoader->DeleteProgram(program); diff --git a/grk/project/textures/planets/earth_daymap.jpg b/grk/project/textures/planets/earth_daymap.jpg new file mode 100644 index 0000000..9f8b192 Binary files /dev/null and b/grk/project/textures/planets/earth_daymap.jpg differ diff --git a/grk/project/textures/planets/lol.png b/grk/project/textures/planets/lol.png new file mode 100644 index 0000000..11025e2 Binary files /dev/null and b/grk/project/textures/planets/lol.png differ diff --git a/grk/project/textures/planets/planet1.png b/grk/project/textures/planets/planet1.png new file mode 100644 index 0000000..79d36e4 Binary files /dev/null and b/grk/project/textures/planets/planet1.png differ diff --git a/grk/project/textures/planets/planet1normal.png b/grk/project/textures/planets/planet1normal.png new file mode 100644 index 0000000..ed264ed Binary files /dev/null and b/grk/project/textures/planets/planet1normal.png differ diff --git a/grk/project/textures/planets/planet2.png b/grk/project/textures/planets/planet2.png new file mode 100644 index 0000000..50fec17 Binary files /dev/null and b/grk/project/textures/planets/planet2.png differ diff --git a/grk/project/textures/planets/planet2normal.png b/grk/project/textures/planets/planet2normal.png new file mode 100644 index 0000000..15c9f48 Binary files /dev/null and b/grk/project/textures/planets/planet2normal.png differ diff --git a/grk/project/textures/planets/planet3.png b/grk/project/textures/planets/planet3.png new file mode 100644 index 0000000..23c0c90 Binary files /dev/null and b/grk/project/textures/planets/planet3.png differ diff --git a/grk/project/textures/planets/planet3normal.png b/grk/project/textures/planets/planet3normal.png new file mode 100644 index 0000000..1f7e189 Binary files /dev/null and b/grk/project/textures/planets/planet3normal.png differ diff --git a/grk/project/textures/planets/planet4.png b/grk/project/textures/planets/planet4.png new file mode 100644 index 0000000..da62242 Binary files /dev/null and b/grk/project/textures/planets/planet4.png differ diff --git a/grk/project/textures/planets/planet4normal.png b/grk/project/textures/planets/planet4normal.png new file mode 100644 index 0000000..6921ee6 Binary files /dev/null and b/grk/project/textures/planets/planet4normal.png differ