Avoid using matrix4 calculation
This commit is contained in:
parent
497b7e3f14
commit
5884d7b9d8
@ -59,11 +59,7 @@ void main(void)
|
||||
// Keep direction
|
||||
tangent = (ViewMatrix * ModelMatrix * vec4(Tangent, 0.)).xyz;
|
||||
bitangent = (ViewMatrix * ModelMatrix * vec4(Bitangent, 0.)).xyz;
|
||||
uv = (mat4(1., 0., 0., 0.,
|
||||
0., 1., 0., 0.,
|
||||
misc_data.x, misc_data.y, 1., 0.,
|
||||
0., 0., 0., 1.)
|
||||
* vec4(Texcoord, 1., 1.)).xy;
|
||||
uv = vec2(Texcoord.x + misc_data.x, Texcoord.y + misc_data.y);
|
||||
uv_bis = SecondTexcoord;
|
||||
color = Color.zyxw;
|
||||
color_change = misc_data.zw;
|
||||
|
@ -54,10 +54,6 @@ void main(void)
|
||||
// Keep direction
|
||||
tangent = (ViewMatrix * ModelMatrix * vec4(Tangent, 0.)).xyz;
|
||||
bitangent = (ViewMatrix * ModelMatrix * vec4(Bitangent, 0.)).xyz;
|
||||
uv = (mat4(1., 0., 0., 0.,
|
||||
0., 1., 0., 0.,
|
||||
texture_trans.x, texture_trans.y, 1., 0.,
|
||||
0., 0., 0., 1.)
|
||||
* vec4(Texcoord, 1., 1.)).xy;
|
||||
uv = vec2(Texcoord.x + texture_trans.x, Texcoord.y + texture_trans.y);
|
||||
uv_bis = SecondTexcoord;
|
||||
}
|
||||
|
@ -28,11 +28,7 @@ void main(void)
|
||||
mat4 TransposeInverseModel = transpose(inverse(ModelMatrix));
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||
nor = (TransposeInverseModel * vec4(Normal, 0.)).xyz;
|
||||
uv = (mat4(1., 0., 0., 0.,
|
||||
0., 1., 0., 0.,
|
||||
texture_trans.x, texture_trans.y, 1., 0.,
|
||||
0., 0., 0., 1.)
|
||||
* vec4(Texcoord, 1., 1.)).xy;
|
||||
uv = vec2(Texcoord.x + texture_trans.x, Texcoord.y + texture_trans.y);
|
||||
uv_bis = SecondTexcoord;
|
||||
color = Color.zyxw;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user