Commit 92c9c91f authored by Tim Übelhör's avatar Tim Übelhör

Setting camera position in shader for specular lighting

parent 840720ec
......@@ -78,10 +78,11 @@ void CvCamera::resize_intrinsics(int width, int height)
void CvCamera::set_in_shader(const Shader &shader) const
{
shader.activate();
shader.setMat4("projection_matrix", get_projection_matrix());
shader.setMat4("view_matrix", get_view_matrix());
shader.setVec3("camera_position", this->pose.position);
shader.setArray("dist_coeffs", this->intrinsics.dist_coeffs,
sizeof(this->intrinsics.dist_coeffs));
shader.setMat4("projection_matrix", get_projection_matrix());
shader.setMat4("view_matrix", get_view_matrix());
}
CameraIntrinsics CvCamera::get_intrinsics() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment