Modified behaviour of KRSprite's
KRSprite's no longer have a "sprite_size" attribute. Instead, the node's scale is used. KRSprite's no longer orient towards the camera automatically. This enables applications to perform their own orientation behaviours and use the sprites for UI elements that may rotate. --HG-- branch : nfb
This commit is contained in:
@@ -32,11 +32,10 @@
|
||||
attribute mediump vec2 vertex_uv;
|
||||
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
|
||||
uniform mediump vec4 viewport;
|
||||
uniform mediump float flare_size;
|
||||
|
||||
varying mediump vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
texCoord = vertex_uv;
|
||||
gl_Position = mvp_matrix * vec4(0.0, 0.0, 0.0, 1.0) + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size;
|
||||
gl_Position = mvp_matrix * vec4(vertex_uv.x * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user