mirror of
https://github.com/lubosz/overte.git
synced 2025-04-17 00:57:44 +02:00
fix projection between shaders
This commit is contained in:
parent
c0bfdfbc4f
commit
07515d1c5f
2 changed files with 3 additions and 3 deletions
|
@ -5,6 +5,6 @@ varying float voxelSize;
|
|||
|
||||
void main(void) {
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_Position = gl_ModelViewMatrix * gl_Vertex; // don't call ftransform(), because we do projection in geometry shader
|
||||
gl_Position = gl_Vertex; // don't call ftransform(), because we do projection in geometry shader
|
||||
voxelSize = voxelSizeIn;
|
||||
}
|
|
@ -12,7 +12,7 @@
|
|||
// Second dataset (? similar to how voxel avatars pass in bones??)
|
||||
// which is the voxel size
|
||||
//
|
||||
// Note: In vertex shader DON'T do projection transform. Therefore passing the 3D coordinates xyz to geometric shader
|
||||
// Note: In vertex shader doesn't do any transform. Therefore passing the 3D world coordinates xyz to us
|
||||
//
|
||||
// Output: GL_TRIANGLE_STRIP
|
||||
//
|
||||
|
@ -36,7 +36,7 @@ void faceOfVoxel(vec4 corner, float scale, float[COORD_PER_FACE] facePoints, vec
|
|||
vertex[c] += (facePoints[cIndex] * scale);
|
||||
}
|
||||
gl_FrontColor = color;
|
||||
gl_Position = gl_ProjectionMatrix * vertex;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vertex;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
|
|
Loading…
Reference in a new issue