diff --git a/samples/bin/library/spine_shader.frag b/samples/bin/library/spine_shader.frag index c48ba948..878cc4cc 100644 --- a/samples/bin/library/spine_shader.frag +++ b/samples/bin/library/spine_shader.frag @@ -1,10 +1,8 @@ -#version 120 - uniform sampler2D u_texture; -varying vec4 v_tint; -varying vec2 v_st; +varying vec2 v_st0; +varying vec4 v_color0; void main() { - gl_FragColor = texture2D(u_texture, v_st) * v_tint; + gl_FragColor = texture2D(u_texture, v_st0) * v_color0; } diff --git a/samples/bin/library/spine_shader.vert b/samples/bin/library/spine_shader.vert index 57e41375..4c704e6e 100644 --- a/samples/bin/library/spine_shader.vert +++ b/samples/bin/library/spine_shader.vert @@ -1,16 +1,18 @@ -#version 120 - uniform mat4 u_matrix_vp; attribute vec3 a_vertex; -attribute vec4 a_tint; -attribute vec2 a_st; +attribute vec2 a_st0; +attribute vec4 a_color0; -varying vec4 v_tint; -varying vec2 v_st; +varying vec2 v_st0; +varying vec4 v_color0; + +vec4 vertex_to_homo(vec3 pos) { + return vec4(pos, 1.0) * u_matrix_vp; +} void main() { - v_st = a_st; - v_tint = a_tint; - gl_Position = vec4(a_vertex, 1.0) * u_matrix_vp; + v_st0 = a_st0; + v_color0 = a_color0; + gl_Position = vertex_to_homo(a_vertex); } diff --git a/samples/sources/sample_07/sample_07.cpp b/samples/sources/sample_07/sample_07.cpp index 7cffc429..cf6515da 100644 --- a/samples/sources/sample_07/sample_07.cpp +++ b/samples/sources/sample_07/sample_07.cpp @@ -112,8 +112,8 @@ namespace .set_animation(0, "animation", true)); node_iptr coin_n = coin_i->get_component().get().node(); - coin_n->scale(v3f(0.125f)); - coin_n->translation(v3f{200.0f, 200.0f, 0.0f}); + coin_n->scale(v3f(0.25f)); + coin_n->translation(v3f{200.0f, 180.0f, 0.0f}); raptor_gobj_ = the().instantiate(); raptor_gobj_->entity_filler()