]> git.tdb.fi Git - libs/gl.git/blobdiff - demos/cubemap.cpp
Bring back reflection mapping support to standard shaders
[libs/gl.git] / demos / cubemap.cpp
index 512f519f260d619450dd9f60f938ec1f2db0dffa..4679590d3e65057076e5d8d7b0e749611c2f40ee 100644 (file)
@@ -93,6 +93,8 @@ int main()
        GL::ProgramData shdata;
        shdata.uniform("environment", 0);
        shdata.uniform("reflectivity", 0.5f);
+       float env_mat[9] = { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
+       shdata.uniform_matrix3("env_eye_matrix", env_mat);
 
        GL::MatrixStack::projection() = GL::Matrix::frustum_centered(0.15, 0.1, 0.1, 10);