Category : vertex-shader

this is my CAMERA class which makes viewMat uniform var in vertexshader. struct CAMERA { glm::vec3 EYE{ 0.0f,0.0f,150.0f }; glm::vec3 AT{ 0.0f,0.0f,0.0f }; glm::vec3 UP{ 0.0f,1.0f,0.0f }; glm::vec3 Dir() { return glm::normalize(this->EYE – this->AT); } glm::vec3 Right() { return glm::normalize(glm::cross(this->UP, this->Dir())); } glm::vec3 Up() { return glm::normalize(glm::cross(this->Dir(), this->Right())); } glm::mat4 view_M() { glm::vec3 cameraDirection = ..

Read more