我的天空盒边缘出现黑色三角形。当我靠近它们时它们会消失,当我用相机远离它们时它们会变大。我的问题可能出在哪里?谢谢
mat4 VP = camera[currentCamera]->GetViewProjectionMatrix();
glm::mat4 S = glm::scale(glm::mat4(1),glm::vec3(150.0, 150.0, 150.0));
glm::mat4 MVP = VP*S;
skybox->Render(glm::value_ptr(MVP));
渲染函数是:
void Renderable::Render(const GLfloat* MVP)
{
shader.Use();
glUniformMatrix4fv(shader("MVP"), 1, GL_FALSE, MVP);
SetCustomUniforms();
glBindVertexArray(vaoID);
glDrawElements(primType, totalIndices, GL_UNSIGNED_INT, 0);
glBindVertexArray(0);
shader.UnUse();
}