torus occlusion working

This commit is contained in:
2019-02-07 17:15:17 -05:00
parent b504bf0222
commit 3263c7e45e

View File

@@ -52,8 +52,6 @@ struct State {
std::vector<glm::vec4> verts_thin{};
std::vector<unsigned> inds_thin{};
glm::mat4 rot = glm::identity<glm::mat4>();
Unifs unifs;
glm::vec4 hopf(float xi, float nu, float eta) {
@@ -68,6 +66,8 @@ struct State {
glm::vec3 stereo(float xi, float nu, float eta) {
auto h = hopf(xi, nu, eta);
glm::mat4 rot = glm::identity<glm::mat4>();
h = rot * h;
return h.xyz() / (1 - h.w);