mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-16 14:08:59 +07:00
remove spine integration
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
varying vec2 v_st0;
|
||||
varying vec4 v_color0;
|
||||
|
||||
void main() {
|
||||
vec4 c = texture2D(u_texture, v_st0) * v_color0;
|
||||
c.rgb *= c.a;
|
||||
gl_FragColor = c;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"vertex" : "spine_shader.vert",
|
||||
"fragment" : "spine_shader.frag"
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
uniform vec2 u_screen_s;
|
||||
uniform mat4 u_matrix_vp;
|
||||
|
||||
attribute vec3 a_vertex;
|
||||
attribute vec2 a_st0;
|
||||
attribute vec4 a_color0;
|
||||
|
||||
varying vec2 v_st0;
|
||||
varying vec4 v_color0;
|
||||
|
||||
vec2 round(vec2 v) {
|
||||
return vec2(
|
||||
floor(v.x + 0.5),
|
||||
floor(v.y + 0.5));
|
||||
}
|
||||
|
||||
vec4 pixel_snap(vec4 pos) {
|
||||
vec2 hpc = u_screen_s * 0.5;
|
||||
vec2 pixel_pos = round((pos.xy / pos.w) * hpc);
|
||||
pos.xy = pixel_pos / hpc * pos.w;
|
||||
return pos;
|
||||
}
|
||||
|
||||
vec4 vertex_to_homo(vec3 pos) {
|
||||
return vec4(pos, 1.0) * u_matrix_vp;
|
||||
}
|
||||
|
||||
void main() {
|
||||
v_st0 = a_st0;
|
||||
v_color0 = a_color0;
|
||||
#ifndef VERTEX_SNAPPING_ON
|
||||
gl_Position = vertex_to_homo(a_vertex);
|
||||
#else
|
||||
gl_Position = pixel_snap(vertex_to_homo(a_vertex));
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user