Nie mam już pomysłu, po dodaniu płaszczyzny wszystko jest ok, następnie dodaję światło robiąc translację, żeby było w innej pozycji, chcę zrobić tak samo z wgranym modelem, ale on jest cały czas w pozycja światła nie ważne jakie wartości ustawie w translacji.
//PLANE
// render normal-mapped quad
glm::mat4 model = glm::mat4(1.0f);
// model = glm::rotate(model, glm::radians((float)glfwGetTime() * -10.0f), glm::normalize(glm::vec3(1.0, 0.0, 1.0))); // rotate the quad to show normal mapping from multiple directions
model = glm::scale(model, glm::vec3(15.0f,15.0f,15.0f));
model = glm::rotate(model,-90.0f,glm::vec3(1.0f,0.0f,0.0f));
shader.setMat4("model", model);
shader.setVec3("viewPos", camera.Position);
shader.setVec3("lightPos", lightPos);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, diffuseMap);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, normalMap);
renderQuad();
// SWIATLO
// render light source (simply re-renders a smaller plane at the light's position for debugging/visualization)
model = glm::mat4(1.0f);
model = glm::translate(model, glm::vec3(0.1f, 4.0f, 0.7f));
model = glm::scale(model, glm::vec3(0.1f));
shader.setMat4("model", model);
renderQuad();
//MODEL 1
model = glm::mat4(1.0f);
model = glm::translate(model, glm::vec3(0.0f, -15.0f, 0.0f)); // translate it down so it's at the center of the scene
model = glm::scale(model, glm::vec3(0.2f, 0.2f, 0.2f)); // it's a bit too big for our scene, so scale it down
modelshader.setMat4("model", model);
farmhouse.Draw(modelshader);