mirror of https://github.com/CGAL/cgal
Fix shader
This commit is contained in:
parent
3b3707ad19
commit
09be0c65b9
|
|
@ -4,6 +4,7 @@ in vec3 normals;
|
|||
in vec4 colors;
|
||||
uniform mat4 mvp_matrix;
|
||||
uniform mat4 mv_matrix;
|
||||
uniform mat4 f_matrix;
|
||||
out vec4 fP;
|
||||
out vec3 fN;
|
||||
out vec4 color;
|
||||
|
|
@ -38,11 +39,11 @@ void main(void)
|
|||
//
|
||||
if(is_clipbox_on)
|
||||
compute_distances();
|
||||
fP = mv_matrix * vertex;
|
||||
fP = mv_matrix * f_matrix * vertex;
|
||||
mat3 mv_matrix_3;
|
||||
mv_matrix_3[0] = mv_matrix[0].xyz;
|
||||
mv_matrix_3[1] = mv_matrix[1].xyz;
|
||||
mv_matrix_3[2] = mv_matrix[2].xyz;
|
||||
fN = mv_matrix_3* normals;
|
||||
gl_Position = mvp_matrix * vertex;
|
||||
gl_Position = mvp_matrix * f_matrix * vertex;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue