SL-17274: Cleanup position

meow-7.2.2
Ptolemy 2022-06-27 16:39:14 -07:00
parent 46c817d851
commit 780bed6c2b
1 changed files with 4 additions and 3 deletions

View File

@ -78,23 +78,24 @@ VARYING vec2 vary_texcoord0;
void main()
{
vec4 pos4 = vec4(position,1.0);
#ifdef HAS_SKIN
mat4 mat = getObjectSkinnedTransform();
mat = modelview_matrix * mat;
vec3 pos = (mat*vec4(position.xyz,1.0)).xyz;
vec3 pos = (mat*pos4).xyz;
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
vary_position = pos;
#endif
gl_Position = projection_matrix*vec4(pos,1.0);
gl_Position = projection_matrix*pos4;
#else
//transform vertex
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
gl_Position = modelview_projection_matrix * pos4;
#endif
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;