javier-martinez-palmer / oglsuperbible5

Automatically exported from code.google.com/p/oglsuperbible5
0 stars 0 forks source link

GSCullling.gs should not transform normal #56

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In GSCulling.vs (vertex shader), we are not transforming the vertex with the 
mvp matrix. The vertex is sent to the geometry shader as it is, which means it 
is in its world coordinates.

We also have the world coordinates for the viewpoint. In this case, we should 
not multiply the normal vector with the normal matrix.

//    vec3 transformed_normal = (normalMatrix * normal);
    vec3 transformed_normal = normal;

Of course, because of the way the viewpoint is rotating all over the place, it 
does not make an iota of a difference to the final output of the program.

Original issue reported on code.google.com by nag.ra...@gmail.com on 21 Sep 2012 at 11:44