mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
graphics: Rename variables
This commit is contained in:
parent
69e83fa759
commit
a2cc291573
@ -80,7 +80,7 @@ var (
|
|||||||
normalize: true,
|
normalize: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "geo_matrix",
|
name: "geo_matrix_body",
|
||||||
dataType: opengl.Float,
|
dataType: opengl.Float,
|
||||||
num: 4,
|
num: 4,
|
||||||
normalize: false,
|
normalize: false,
|
||||||
|
@ -42,20 +42,20 @@ uniform highp mat4 projection_matrix;
|
|||||||
uniform highp mat4 modelview_matrix; // TODO: Remove this
|
uniform highp mat4 modelview_matrix; // TODO: Remove this
|
||||||
attribute highp vec2 vertex;
|
attribute highp vec2 vertex;
|
||||||
attribute highp vec2 tex_coord;
|
attribute highp vec2 tex_coord;
|
||||||
attribute highp vec4 geo_matrix;
|
attribute highp vec4 geo_matrix_body;
|
||||||
attribute highp vec2 geo_matrix_translation;
|
attribute highp vec2 geo_matrix_translation;
|
||||||
varying highp vec2 vertex_out_tex_coord;
|
varying highp vec2 vertex_out_tex_coord;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vertex_out_tex_coord = tex_coord;
|
vertex_out_tex_coord = tex_coord;
|
||||||
mat4 x = modelview_matrix; // temporary hack not to omit modelview_matrix
|
mat4 x = modelview_matrix; // temporary hack not to omit modelview_matrix
|
||||||
mat4 geom = mat4(
|
mat4 geo_matrix = mat4(
|
||||||
vec4(geo_matrix[0], geo_matrix[2], 0, 0),
|
vec4(geo_matrix_body[0], geo_matrix_body[2], 0, 0),
|
||||||
vec4(geo_matrix[1], geo_matrix[3], 0, 0),
|
vec4(geo_matrix_body[1], geo_matrix_body[3], 0, 0),
|
||||||
vec4(0, 0, 1, 0),
|
vec4(0, 0, 1, 0),
|
||||||
vec4(geo_matrix_translation, 0, 1)
|
vec4(geo_matrix_translation, 0, 1)
|
||||||
);
|
);
|
||||||
gl_Position = projection_matrix * geom * vec4(vertex, 0, 1);
|
gl_Position = projection_matrix * geo_matrix * vec4(vertex, 0, 1);
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
shaderFragmentTexture: `
|
shaderFragmentTexture: `
|
||||||
|
Loading…
Reference in New Issue
Block a user