src/render/opengles2/SDL_shaders_gles2.c
author Sam Lantinga <slouken@libsdl.org>
Sun, 01 Jan 2017 18:33:28 -0800
changeset 10737 3406a0f8b041
parent 9998 f67cf37e9cd4
child 11282 180e8906dc3c
permissions -rw-r--r--
Updated copyright for 2017
slouken@5201
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@10737
     3
  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
slouken@5201
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@5201
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@5201
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@5201
    20
*/
icculus@8093
    21
#include "../../SDL_internal.h"
slouken@5201
    22
slouken@5226
    23
#if SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED
slouken@5201
    24
slouken@5201
    25
#include "SDL_video.h"
slouken@5204
    26
#include "SDL_opengles2.h"
slouken@5201
    27
#include "SDL_shaders_gles2.h"
slouken@5201
    28
#include "SDL_stdinc.h"
slouken@5201
    29
slouken@5201
    30
/*************************************************************************************************
slouken@5201
    31
 * Vertex/fragment shader source                                                                 *
slouken@5201
    32
 *************************************************************************************************/
slouken@5201
    33
slouken@5201
    34
static const Uint8 GLES2_VertexSrc_Default_[] = " \
slouken@5201
    35
    uniform mat4 u_projection; \
gabomdq@6320
    36
    attribute vec2 a_position; \
slouken@5201
    37
    attribute vec2 a_texCoord; \
gabomdq@6320
    38
    attribute float a_angle; \
gabomdq@6320
    39
    attribute vec2 a_center; \
slouken@5201
    40
    varying vec2 v_texCoord; \
slouken@5201
    41
    \
slouken@5201
    42
    void main() \
slouken@5201
    43
    { \
gabomdq@6320
    44
        float angle = radians(a_angle); \
gabomdq@6320
    45
        float c = cos(angle); \
gabomdq@6320
    46
        float s = sin(angle); \
gabomdq@6320
    47
        mat2 rotationMatrix = mat2(c, -s, s, c); \
gabomdq@6320
    48
        vec2 position = rotationMatrix * (a_position - a_center) + a_center; \
slouken@5201
    49
        v_texCoord = a_texCoord; \
gabomdq@6320
    50
        gl_Position = u_projection * vec4(position, 0.0, 1.0);\
slouken@5201
    51
        gl_PointSize = 1.0; \
slouken@5201
    52
    } \
slouken@5201
    53
";
slouken@5201
    54
slouken@5201
    55
static const Uint8 GLES2_FragmentSrc_SolidSrc_[] = " \
slouken@5201
    56
    precision mediump float; \
slouken@5201
    57
    uniform vec4 u_color; \
slouken@5201
    58
    \
slouken@5201
    59
    void main() \
slouken@5201
    60
    { \
slouken@5201
    61
        gl_FragColor = u_color; \
slouken@5201
    62
    } \
slouken@5201
    63
";
slouken@5201
    64
slouken@6113
    65
static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \
slouken@5201
    66
    precision mediump float; \
slouken@5201
    67
    uniform sampler2D u_texture; \
slouken@5201
    68
    uniform vec4 u_modulation; \
slouken@5201
    69
    varying vec2 v_texCoord; \
slouken@5201
    70
    \
slouken@5201
    71
    void main() \
slouken@5201
    72
    { \
slouken@5201
    73
        gl_FragColor = texture2D(u_texture, v_texCoord); \
slouken@5201
    74
        gl_FragColor *= u_modulation; \
slouken@5201
    75
    } \
slouken@5201
    76
";
slouken@5201
    77
slouken@7191
    78
/* ARGB to ABGR conversion */
slouken@6113
    79
static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \
slouken@6113
    80
    precision mediump float; \
slouken@6113
    81
    uniform sampler2D u_texture; \
slouken@6113
    82
    uniform vec4 u_modulation; \
slouken@6113
    83
    varying vec2 v_texCoord; \
slouken@6113
    84
    \
slouken@6113
    85
    void main() \
slouken@6113
    86
    { \
slouken@6113
    87
        vec4 abgr = texture2D(u_texture, v_texCoord); \
slouken@6113
    88
        gl_FragColor = abgr; \
slouken@6113
    89
        gl_FragColor.r = abgr.b; \
slouken@6113
    90
        gl_FragColor.b = abgr.r; \
slouken@6113
    91
        gl_FragColor *= u_modulation; \
slouken@6113
    92
    } \
slouken@6113
    93
";
slouken@6113
    94
slouken@7191
    95
/* RGB to ABGR conversion */
slouken@6113
    96
static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \
slouken@6113
    97
    precision mediump float; \
slouken@6113
    98
    uniform sampler2D u_texture; \
slouken@6113
    99
    uniform vec4 u_modulation; \
slouken@6113
   100
    varying vec2 v_texCoord; \
slouken@6113
   101
    \
slouken@6113
   102
    void main() \
slouken@6113
   103
    { \
slouken@6113
   104
        vec4 abgr = texture2D(u_texture, v_texCoord); \
slouken@6113
   105
        gl_FragColor = abgr; \
slouken@6113
   106
        gl_FragColor.r = abgr.b; \
slouken@6113
   107
        gl_FragColor.b = abgr.r; \
slouken@6113
   108
        gl_FragColor.a = 1.0; \
slouken@6113
   109
        gl_FragColor *= u_modulation; \
slouken@6113
   110
    } \
slouken@6113
   111
";
slouken@6113
   112
slouken@7191
   113
/* BGR to ABGR conversion */
slouken@6113
   114
static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
slouken@6113
   115
    precision mediump float; \
slouken@6113
   116
    uniform sampler2D u_texture; \
slouken@6113
   117
    uniform vec4 u_modulation; \
slouken@6113
   118
    varying vec2 v_texCoord; \
slouken@6113
   119
    \
slouken@6113
   120
    void main() \
slouken@6113
   121
    { \
slouken@6113
   122
        vec4 abgr = texture2D(u_texture, v_texCoord); \
slouken@6113
   123
        gl_FragColor = abgr; \
slouken@6113
   124
        gl_FragColor.a = 1.0; \
slouken@6113
   125
        gl_FragColor *= u_modulation; \
slouken@6113
   126
    } \
slouken@6113
   127
";
slouken@6113
   128
slouken@8835
   129
/* YUV to ABGR conversion */
slouken@8835
   130
static const Uint8 GLES2_FragmentSrc_TextureYUVSrc_[] = " \
slouken@8835
   131
    precision mediump float; \
slouken@8835
   132
    uniform sampler2D u_texture; \
slouken@8835
   133
    uniform sampler2D u_texture_u; \
slouken@8835
   134
    uniform sampler2D u_texture_v; \
slouken@8835
   135
    uniform vec4 u_modulation; \
slouken@8835
   136
    varying vec2 v_texCoord; \
slouken@8835
   137
    \
slouken@8835
   138
    void main() \
slouken@8835
   139
    { \
slouken@8835
   140
        mediump vec3 yuv; \
slouken@8835
   141
        lowp vec3 rgb; \
slouken@8835
   142
        yuv.x = texture2D(u_texture,   v_texCoord).r; \
slouken@8835
   143
        yuv.y = texture2D(u_texture_u, v_texCoord).r - 0.5; \
slouken@8835
   144
        yuv.z = texture2D(u_texture_v, v_texCoord).r - 0.5; \
slouken@8835
   145
        rgb = mat3( 1,        1,       1, \
slouken@8835
   146
                    0,       -0.39465, 2.03211, \
slouken@8835
   147
                    1.13983, -0.58060, 0) * yuv; \
slouken@8835
   148
        gl_FragColor = vec4(rgb, 1); \
slouken@8835
   149
        gl_FragColor *= u_modulation; \
slouken@8835
   150
    } \
slouken@8835
   151
";
slouken@8835
   152
slouken@9046
   153
/* NV12 to ABGR conversion */
slouken@9046
   154
static const Uint8 GLES2_FragmentSrc_TextureNV12Src_[] = " \
slouken@9046
   155
    precision mediump float; \
slouken@9046
   156
    uniform sampler2D u_texture; \
slouken@9046
   157
    uniform sampler2D u_texture_u; \
slouken@9046
   158
    uniform vec4 u_modulation; \
slouken@9046
   159
    varying vec2 v_texCoord; \
slouken@9046
   160
    \
slouken@9046
   161
    void main() \
slouken@9046
   162
    { \
slouken@9046
   163
        mediump vec3 yuv; \
slouken@9046
   164
        lowp vec3 rgb; \
slouken@9046
   165
        yuv.x = texture2D(u_texture,   v_texCoord).r; \
slouken@9046
   166
        yuv.yz = texture2D(u_texture_u, v_texCoord).ra - 0.5; \
slouken@9046
   167
        rgb = mat3( 1,        1,       1, \
slouken@9046
   168
                    0,       -0.39465, 2.03211, \
slouken@9046
   169
                    1.13983, -0.58060, 0) * yuv; \
slouken@9046
   170
        gl_FragColor = vec4(rgb, 1); \
slouken@9046
   171
        gl_FragColor *= u_modulation; \
slouken@9046
   172
    } \
slouken@9046
   173
";
slouken@9046
   174
slouken@9046
   175
/* NV21 to ABGR conversion */
slouken@9046
   176
static const Uint8 GLES2_FragmentSrc_TextureNV21Src_[] = " \
slouken@9046
   177
    precision mediump float; \
slouken@9046
   178
    uniform sampler2D u_texture; \
slouken@9046
   179
    uniform sampler2D u_texture_u; \
slouken@9046
   180
    uniform vec4 u_modulation; \
slouken@9046
   181
    varying vec2 v_texCoord; \
slouken@9046
   182
    \
slouken@9046
   183
    void main() \
slouken@9046
   184
    { \
slouken@9046
   185
        mediump vec3 yuv; \
slouken@9046
   186
        lowp vec3 rgb; \
slouken@9046
   187
        yuv.x = texture2D(u_texture,   v_texCoord).r; \
slouken@9046
   188
        yuv.yz = texture2D(u_texture_u, v_texCoord).ar - 0.5; \
slouken@9046
   189
        rgb = mat3( 1,        1,       1, \
slouken@9046
   190
                    0,       -0.39465, 2.03211, \
slouken@9046
   191
                    1.13983, -0.58060, 0) * yuv; \
slouken@9046
   192
        gl_FragColor = vec4(rgb, 1); \
slouken@9046
   193
        gl_FragColor *= u_modulation; \
slouken@9046
   194
    } \
slouken@9046
   195
";
slouken@9046
   196
slouken@5201
   197
static const GLES2_ShaderInstance GLES2_VertexSrc_Default = {
slouken@5201
   198
    GL_VERTEX_SHADER,
slouken@5201
   199
    GLES2_SOURCE_SHADER,
slouken@5201
   200
    sizeof(GLES2_VertexSrc_Default_),
slouken@5201
   201
    GLES2_VertexSrc_Default_
slouken@5201
   202
};
slouken@5201
   203
slouken@5201
   204
static const GLES2_ShaderInstance GLES2_FragmentSrc_SolidSrc = {
slouken@5201
   205
    GL_FRAGMENT_SHADER,
slouken@5201
   206
    GLES2_SOURCE_SHADER,
slouken@5201
   207
    sizeof(GLES2_FragmentSrc_SolidSrc_),
slouken@5201
   208
    GLES2_FragmentSrc_SolidSrc_
slouken@5201
   209
};
slouken@5201
   210
slouken@6113
   211
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureABGRSrc = {
slouken@5201
   212
    GL_FRAGMENT_SHADER,
slouken@5201
   213
    GLES2_SOURCE_SHADER,
slouken@6113
   214
    sizeof(GLES2_FragmentSrc_TextureABGRSrc_),
slouken@6113
   215
    GLES2_FragmentSrc_TextureABGRSrc_
slouken@6113
   216
};
slouken@6113
   217
slouken@6113
   218
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureARGBSrc = {
slouken@6113
   219
    GL_FRAGMENT_SHADER,
slouken@6113
   220
    GLES2_SOURCE_SHADER,
slouken@6113
   221
    sizeof(GLES2_FragmentSrc_TextureARGBSrc_),
slouken@6113
   222
    GLES2_FragmentSrc_TextureARGBSrc_
slouken@6113
   223
};
slouken@6113
   224
slouken@6113
   225
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureRGBSrc = {
slouken@6113
   226
    GL_FRAGMENT_SHADER,
slouken@6113
   227
    GLES2_SOURCE_SHADER,
slouken@6113
   228
    sizeof(GLES2_FragmentSrc_TextureRGBSrc_),
slouken@6113
   229
    GLES2_FragmentSrc_TextureRGBSrc_
slouken@6113
   230
};
slouken@6113
   231
slouken@6113
   232
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureBGRSrc = {
slouken@6113
   233
    GL_FRAGMENT_SHADER,
slouken@6113
   234
    GLES2_SOURCE_SHADER,
slouken@6113
   235
    sizeof(GLES2_FragmentSrc_TextureBGRSrc_),
slouken@6113
   236
    GLES2_FragmentSrc_TextureBGRSrc_
slouken@5201
   237
};
slouken@5201
   238
slouken@8835
   239
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureYUVSrc = {
slouken@8835
   240
    GL_FRAGMENT_SHADER,
slouken@8835
   241
    GLES2_SOURCE_SHADER,
slouken@8835
   242
    sizeof(GLES2_FragmentSrc_TextureYUVSrc_),
slouken@8835
   243
    GLES2_FragmentSrc_TextureYUVSrc_
slouken@8835
   244
};
slouken@8835
   245
slouken@9046
   246
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureNV12Src = {
slouken@9046
   247
    GL_FRAGMENT_SHADER,
slouken@9046
   248
    GLES2_SOURCE_SHADER,
slouken@9046
   249
    sizeof(GLES2_FragmentSrc_TextureNV12Src_),
slouken@9046
   250
    GLES2_FragmentSrc_TextureNV12Src_
slouken@9046
   251
};
slouken@9046
   252
slouken@9046
   253
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureNV21Src = {
slouken@9046
   254
    GL_FRAGMENT_SHADER,
slouken@9046
   255
    GLES2_SOURCE_SHADER,
slouken@9046
   256
    sizeof(GLES2_FragmentSrc_TextureNV21Src_),
slouken@9046
   257
    GLES2_FragmentSrc_TextureNV21Src_
slouken@9046
   258
};
slouken@9046
   259
slouken@8835
   260
slouken@5201
   261
/*************************************************************************************************
slouken@5201
   262
 * Vertex/fragment shader binaries (NVIDIA Tegra 1/2)                                            *
slouken@5201
   263
 *************************************************************************************************/
slouken@5201
   264
slouken@5201
   265
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   266
slouken@5201
   267
#define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
slouken@5201
   268
slouken@5201
   269
static const Uint8 GLES2_VertexTegra_Default_[] = {
slouken@5201
   270
    243, 193, 1, 142, 31, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   271
    0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 85, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 3, 0, 0, 0,
slouken@5201
   272
    91, 0, 0, 0, 1, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   273
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 95, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0,
slouken@5201
   274
    13, 0, 0, 0, 102, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   275
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   276
    0, 0, 0, 16, 0, 0, 0, 104, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 17, 0, 0, 0, 112, 0, 0, 0, 0, 0,
slouken@5201
   277
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 112, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 19, 0, 0, 0, 132, 0,
slouken@5201
   278
    0, 0, 104, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   279
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97,
slouken@5201
   280
    95, 112, 111, 115, 105, 116, 105, 111, 110, 0, 97, 95, 116, 101, 120, 67, 111, 111, 114, 100,
slouken@5201
   281
    0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 112, 114, 111, 106, 101, 99,
slouken@5201
   282
    116, 105, 111, 110, 0, 0, 0, 0, 0, 0, 0, 82, 139, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 80, 139, 0,
slouken@5201
   283
    0, 1, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 33, 0, 0, 0, 92, 139, 0, 0,
slouken@5201
   284
    1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 240, 0, 0, 0, 0, 0, 0, 1, 0,
slouken@5201
   285
    0, 0, 64, 0, 0, 0, 80, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 193, 0, 0, 0,
slouken@5201
   286
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   287
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   288
    0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 66, 24, 0, 6, 34, 108, 28,
slouken@5201
   289
    0, 0, 42, 16, 128, 0, 195, 192, 6, 129, 252, 255, 65, 96, 108, 28, 0, 0, 0, 0, 0, 1, 195, 192,
slouken@5201
   290
    6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 8, 1, 64, 0, 131, 192, 6, 1, 156, 159, 65, 96, 108,
slouken@5201
   291
    28, 0, 0, 85, 32, 0, 1, 195, 192, 6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 0, 64, 64, 0, 131,
slouken@5201
   292
    192, 134, 1, 152, 31, 65, 96, 108, 156, 31, 64, 127, 48, 0, 1, 195, 192, 6, 129, 129, 255, 33,
slouken@5201
   293
    96
slouken@5201
   294
};
slouken@5201
   295
slouken@5201
   296
static const Uint8 GLES2_FragmentTegra_None_SolidSrc_[] = {
slouken@5201
   297
    155, 191, 159, 1, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   298
    0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   299
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   300
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   301
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   302
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   303
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   304
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   305
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   306
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   307
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   308
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 0, 0, 0, 240, 0, 0,
slouken@5201
   309
    0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0,
slouken@5201
   310
    0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0,
slouken@5201
   311
    0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   312
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1,
slouken@5201
   313
    0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 0, 0, 0, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0, 0, 0,
slouken@5201
   314
    0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 0, 40, 0, 0, 0, 242, 65, 63,
slouken@5201
   315
    192, 200, 0, 0, 0, 242, 65, 63, 128, 168, 0, 0, 0, 242, 65, 63, 64, 72, 0, 0, 0, 242, 65, 63,
slouken@5201
   316
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   317
};
slouken@5201
   318
slouken@5201
   319
static const Uint8 GLES2_FragmentTegra_Alpha_SolidSrc_[] = {
slouken@5201
   320
    169, 153, 195, 28, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   321
    0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   322
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   323
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   324
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   325
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   326
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   327
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   328
    0, 220, 0, 0, 0, 220, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   329
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   330
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   331
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 118, 118, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   332
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   333
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   334
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   335
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   336
    1, 0, 0, 0, 3, 0, 0, 0, 3, 0, 65, 37, 8, 0, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 21, 0,
slouken@5201
   337
    0, 0, 0, 3, 0, 1, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 39, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   338
    0, 0, 0, 0, 0, 3, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0, 9, 0, 0, 0, 24, 0, 4, 40, 232, 231, 15,
slouken@5201
   339
    0, 0, 242, 65, 62, 194, 72, 1, 0, 0, 250, 65, 63, 194, 40, 1, 0, 0, 250, 65, 63, 192, 168, 1,
slouken@5201
   340
    0, 0, 242, 1, 64, 192, 168, 1, 0, 0, 242, 1, 68, 168, 32, 0, 0, 0, 50, 64, 0, 192, 168, 15,
slouken@5201
   341
    0, 0, 242, 1, 66, 168, 64, 0, 16, 0, 242, 65, 1, 232, 231, 15, 0, 0, 242, 65, 62, 168, 160,
slouken@5201
   342
    0, 0, 0, 50, 64, 2, 104, 192, 0, 0, 36, 48, 66, 4, 232, 231, 15, 0, 0, 242, 65, 62, 3, 0, 6,
slouken@5201
   343
    40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 41, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   344
};
slouken@5201
   345
slouken@5201
   346
static const Uint8 GLES2_FragmentTegra_Additive_SolidSrc_[] = {
slouken@5201
   347
    59, 71, 42, 17, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0, 0,
slouken@5201
   348
    0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   349
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   350
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   351
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   352
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   353
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   354
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   355
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   356
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   357
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   358
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 22, 22, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   359
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   360
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   361
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   362
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   363
    1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0,
slouken@5201
   364
    0, 0, 0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 192, 200, 0, 0, 0, 26,
slouken@5201
   365
    0, 70, 192, 40, 0, 0, 0, 2, 0, 64, 192, 72, 0, 0, 0, 10, 0, 66, 192, 168, 0, 0, 0, 18, 0, 68,
slouken@5201
   366
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   367
};
slouken@5201
   368
slouken@5201
   369
static const Uint8 GLES2_FragmentTegra_Modulated_SolidSrc_[] = {
slouken@5201
   370
    37, 191, 49, 17, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0, 0,
slouken@5201
   371
    0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   372
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   373
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   374
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   375
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   376
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   377
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   378
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   379
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   380
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   381
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 32, 32, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   382
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   383
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   384
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   385
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   386
    1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0,
slouken@5201
   387
    0, 0, 0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 104, 192, 0, 0, 0, 242,
slouken@5201
   388
    1, 70, 8, 32, 0, 0, 0, 242, 1, 64, 40, 64, 0, 0, 0, 242, 1, 66, 72, 160, 0, 0, 0, 242, 1, 68,
slouken@5201
   389
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   390
};
slouken@5201
   391
slouken@5201
   392
static const Uint8 GLES2_FragmentTegra_None_TextureSrc_[] = {
slouken@5201
   393
    220, 217, 41, 211, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   394
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   395
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   396
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   397
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   398
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   399
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   400
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   401
    0, 0, 0, 120, 0, 0, 0, 120, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   402
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   403
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   404
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   405
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   406
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   407
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   408
    0, 0, 1, 0, 0, 0, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   409
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1, 0,
slouken@5201
   410
    0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   411
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   412
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 0, 0, 0, 0, 1, 0,
slouken@5201
   413
    0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 1, 0, 0, 0, 2, 0, 4, 38, 186, 81, 78, 16, 2, 1, 0, 0, 1, 0,
slouken@5201
   414
    1, 39, 0, 4, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 104, 192, 0, 0, 0, 242, 1, 70, 8, 32,
slouken@5201
   415
    0, 0, 0, 242, 1, 64, 40, 64, 0, 0, 0, 242, 1, 66, 72, 160, 0, 0, 0, 242, 1, 68, 1, 0, 6, 40,
slouken@5201
   416
    0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   417
};
slouken@5201
   418
slouken@5201
   419
static const Uint8 GLES2_FragmentTegra_Alpha_TextureSrc_[] = {
slouken@5201
   420
    71, 202, 114, 229, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   421
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   422
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   423
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   424
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   425
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   426
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   427
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   428
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   429
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   430
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   431
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   432
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   433
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   434
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   435
    0, 0, 1, 118, 118, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0,
slouken@5201
   436
    240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0,
slouken@5201
   437
    1, 0, 0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16,
slouken@5201
   438
    0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   439
    0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0,
slouken@5201
   440
    8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186,
slouken@5201
   441
    81, 78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0,
slouken@5201
   442
    0, 0, 16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 8, 192, 1, 0, 0, 242, 1, 64, 104, 32, 1, 0,
slouken@5201
   443
    0, 242, 1, 70, 72, 64, 1, 0, 0, 242, 1, 68, 154, 192, 0, 0, 37, 34, 64, 3, 8, 32, 0, 0, 5, 58,
slouken@5201
   444
    208, 4, 40, 64, 0, 0, 5, 50, 208, 4, 72, 160, 0, 0, 37, 42, 208, 4, 2, 0, 6, 40, 0, 0, 0, 0,
slouken@5201
   445
    0, 0, 0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   446
};
slouken@5201
   447
slouken@5201
   448
static const Uint8 GLES2_FragmentTegra_Additive_TextureSrc_[] = {
slouken@5201
   449
    161, 234, 193, 234, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   450
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   451
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   452
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   453
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   454
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   455
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   456
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   457
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   458
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   459
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   460
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   461
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   462
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   463
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   464
    0, 0, 1, 22, 22, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   465
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0,
slouken@5201
   466
    0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   467
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   468
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0, 8, 0,
slouken@5201
   469
    129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186, 81,
slouken@5201
   470
    78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0,
slouken@5201
   471
    16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 104, 32, 1, 0, 0, 242, 1, 70, 8, 192, 1, 0, 0, 242,
slouken@5201
   472
    1, 64, 72, 64, 1, 0, 0, 242, 1, 68, 136, 192, 0, 0, 0, 26, 64, 4, 136, 32, 0, 0, 0, 2, 64, 7,
slouken@5201
   473
    136, 64, 0, 0, 0, 10, 64, 6, 136, 160, 0, 0, 0, 18, 64, 5, 2, 0, 6, 40, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   474
    0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   475
};
slouken@5201
   476
slouken@5201
   477
static const Uint8 GLES2_FragmentTegra_Modulated_TextureSrc_[] = {
slouken@5201
   478
    75, 132, 201, 227, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   479
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   480
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   481
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   482
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   483
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   484
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   485
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   486
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   487
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   488
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   489
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   490
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   491
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   492
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   493
    0, 0, 1, 32, 32, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   494
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0,
slouken@5201
   495
    0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   496
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   497
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0, 8, 0,
slouken@5201
   498
    129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186, 81,
slouken@5201
   499
    78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0,
slouken@5201
   500
    16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 8, 192, 1, 0, 0, 242, 1, 64, 104, 32, 1, 0, 0, 242,
slouken@5201
   501
    1, 70, 72, 64, 1, 0, 0, 242, 1, 68, 104, 192, 0, 0, 0, 242, 65, 4, 232, 32, 0, 0, 0, 242, 65,
slouken@5201
   502
    0, 40, 64, 0, 0, 0, 242, 65, 6, 72, 160, 0, 0, 0, 242, 65, 5, 2, 0, 6, 40, 0, 0, 0, 0, 0, 0,
slouken@5201
   503
    0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   504
};
slouken@5201
   505
slouken@5201
   506
static const GLES2_ShaderInstance GLES2_VertexTegra_Default = {
slouken@5201
   507
    GL_VERTEX_SHADER,
slouken@5201
   508
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   509
    sizeof(GLES2_VertexTegra_Default_),
slouken@5201
   510
    GLES2_VertexTegra_Default_
slouken@5201
   511
};
slouken@5201
   512
slouken@5201
   513
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_SolidSrc = {
slouken@5201
   514
    GL_FRAGMENT_SHADER,
slouken@5201
   515
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   516
    sizeof(GLES2_FragmentTegra_None_SolidSrc_),
slouken@5201
   517
    GLES2_FragmentTegra_None_SolidSrc_
slouken@5201
   518
};
slouken@5201
   519
slouken@5201
   520
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_SolidSrc = {
slouken@5201
   521
    GL_FRAGMENT_SHADER,
slouken@5201
   522
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   523
    sizeof(GLES2_FragmentTegra_Alpha_SolidSrc_),
slouken@5201
   524
    GLES2_FragmentTegra_Alpha_SolidSrc_
slouken@5201
   525
};
slouken@5201
   526
slouken@5201
   527
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_SolidSrc = {
slouken@5201
   528
    GL_FRAGMENT_SHADER,
slouken@5201
   529
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   530
    sizeof(GLES2_FragmentTegra_Additive_SolidSrc_),
slouken@5201
   531
    GLES2_FragmentTegra_Additive_SolidSrc_
slouken@5201
   532
};
slouken@5201
   533
slouken@5201
   534
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_SolidSrc = {
slouken@5201
   535
    GL_FRAGMENT_SHADER,
slouken@5201
   536
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   537
    sizeof(GLES2_FragmentTegra_Modulated_SolidSrc_),
slouken@5201
   538
    GLES2_FragmentTegra_Modulated_SolidSrc_
slouken@5201
   539
};
slouken@5201
   540
slouken@5201
   541
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_TextureSrc = {
slouken@5201
   542
    GL_FRAGMENT_SHADER,
slouken@5201
   543
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   544
    sizeof(GLES2_FragmentTegra_None_TextureSrc_),
slouken@5201
   545
    GLES2_FragmentTegra_None_TextureSrc_
slouken@5201
   546
};
slouken@5201
   547
slouken@5201
   548
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_TextureSrc = {
slouken@5201
   549
    GL_FRAGMENT_SHADER,
slouken@5201
   550
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   551
    sizeof(GLES2_FragmentTegra_Alpha_TextureSrc_),
slouken@5201
   552
    GLES2_FragmentTegra_Alpha_TextureSrc_
slouken@5201
   553
};
slouken@5201
   554
slouken@5201
   555
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_TextureSrc = {
slouken@5201
   556
    GL_FRAGMENT_SHADER,
slouken@5201
   557
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   558
    sizeof(GLES2_FragmentTegra_Additive_TextureSrc_),
slouken@5201
   559
    GLES2_FragmentTegra_Additive_TextureSrc_
slouken@5201
   560
};
slouken@5201
   561
slouken@5201
   562
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_TextureSrc = {
slouken@5201
   563
    GL_FRAGMENT_SHADER,
slouken@5201
   564
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   565
    sizeof(GLES2_FragmentTegra_Modulated_TextureSrc_),
slouken@5201
   566
    GLES2_FragmentTegra_Modulated_TextureSrc_
slouken@5201
   567
};
slouken@5201
   568
slouken@5201
   569
#endif /* GLES2_INCLUDE_NVIDIA_SHADERS */
slouken@5201
   570
slouken@5201
   571
/*************************************************************************************************
slouken@5201
   572
 * Vertex/fragment shader definitions                                                            *
slouken@5201
   573
 *************************************************************************************************/
slouken@5201
   574
slouken@5201
   575
static GLES2_Shader GLES2_VertexShader_Default = {
slouken@6113
   576
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   577
    2,
slouken@6113
   578
#else
slouken@6113
   579
    1,
slouken@6113
   580
#endif
slouken@5201
   581
    {
slouken@5201
   582
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   583
        &GLES2_VertexTegra_Default,
slouken@5201
   584
#endif
slouken@5201
   585
        &GLES2_VertexSrc_Default
slouken@5201
   586
    }
slouken@5201
   587
};
slouken@5201
   588
slouken@5201
   589
static GLES2_Shader GLES2_FragmentShader_None_SolidSrc = {
slouken@6113
   590
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   591
    2,
slouken@6113
   592
#else
slouken@6113
   593
    1,
slouken@6113
   594
#endif
slouken@5201
   595
    {
slouken@5201
   596
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   597
        &GLES2_FragmentTegra_None_SolidSrc,
slouken@5201
   598
#endif
slouken@5201
   599
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   600
    }
slouken@5201
   601
};
slouken@5201
   602
slouken@5201
   603
static GLES2_Shader GLES2_FragmentShader_Alpha_SolidSrc = {
slouken@6113
   604
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   605
    2,
slouken@6113
   606
#else
slouken@6113
   607
    1,
slouken@6113
   608
#endif
slouken@5201
   609
    {
slouken@5201
   610
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   611
        &GLES2_FragmentTegra_Alpha_SolidSrc,
slouken@5201
   612
#endif
slouken@5201
   613
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   614
    }
slouken@5201
   615
};
slouken@5201
   616
slouken@5201
   617
static GLES2_Shader GLES2_FragmentShader_Additive_SolidSrc = {
slouken@6113
   618
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   619
    2,
slouken@6113
   620
#else
slouken@6113
   621
    1,
slouken@6113
   622
#endif
slouken@5201
   623
    {
slouken@5201
   624
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   625
        &GLES2_FragmentTegra_Additive_SolidSrc,
slouken@5201
   626
#endif
slouken@5201
   627
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   628
    }
slouken@5201
   629
};
slouken@5201
   630
slouken@5201
   631
static GLES2_Shader GLES2_FragmentShader_Modulated_SolidSrc = {
slouken@6113
   632
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   633
    2,
slouken@6113
   634
#else
slouken@6113
   635
    1,
slouken@6113
   636
#endif
slouken@5201
   637
    {
slouken@5201
   638
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   639
        &GLES2_FragmentTegra_Modulated_SolidSrc,
slouken@5201
   640
#endif
slouken@5201
   641
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   642
    }
slouken@5201
   643
};
slouken@5201
   644
slouken@6113
   645
static GLES2_Shader GLES2_FragmentShader_None_TextureABGRSrc = {
slouken@6113
   646
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   647
    2,
slouken@6113
   648
#else
slouken@6113
   649
    1,
slouken@6113
   650
#endif
slouken@5201
   651
    {
slouken@5201
   652
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   653
        &GLES2_FragmentTegra_None_TextureSrc,
slouken@5201
   654
#endif
slouken@6113
   655
        &GLES2_FragmentSrc_TextureABGRSrc
slouken@5201
   656
    }
slouken@5201
   657
};
slouken@5201
   658
slouken@6113
   659
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureABGRSrc = {
slouken@6113
   660
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   661
    2,
slouken@6113
   662
#else
slouken@6113
   663
    1,
slouken@6113
   664
#endif
slouken@5201
   665
    {
slouken@5201
   666
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   667
        &GLES2_FragmentTegra_Alpha_TextureSrc,
slouken@5201
   668
#endif
slouken@6113
   669
        &GLES2_FragmentSrc_TextureABGRSrc
slouken@5201
   670
    }
slouken@5201
   671
};
slouken@5201
   672
slouken@6113
   673
static GLES2_Shader GLES2_FragmentShader_Additive_TextureABGRSrc = {
slouken@6113
   674
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   675
    2,
slouken@6113
   676
#else
slouken@6113
   677
    1,
slouken@6113
   678
#endif
slouken@5201
   679
    {
slouken@5201
   680
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   681
        &GLES2_FragmentTegra_Additive_TextureSrc,
slouken@5201
   682
#endif
slouken@6113
   683
        &GLES2_FragmentSrc_TextureABGRSrc
slouken@5201
   684
    }
slouken@5201
   685
};
slouken@5201
   686
slouken@6113
   687
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureABGRSrc = {
slouken@6113
   688
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   689
    2,
slouken@6113
   690
#else
slouken@6113
   691
    1,
slouken@6113
   692
#endif
slouken@5201
   693
    {
slouken@5201
   694
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   695
        &GLES2_FragmentTegra_Modulated_TextureSrc,
slouken@5201
   696
#endif
slouken@6113
   697
        &GLES2_FragmentSrc_TextureABGRSrc
slouken@6113
   698
    }
slouken@6113
   699
};
slouken@6113
   700
slouken@6113
   701
static GLES2_Shader GLES2_FragmentShader_None_TextureARGBSrc = {
slouken@6113
   702
    1,
slouken@6113
   703
    {
slouken@6113
   704
        &GLES2_FragmentSrc_TextureARGBSrc
slouken@6113
   705
    }
slouken@6113
   706
};
slouken@6113
   707
slouken@6113
   708
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureARGBSrc = {
slouken@6113
   709
    1,
slouken@6113
   710
    {
slouken@6113
   711
        &GLES2_FragmentSrc_TextureARGBSrc
slouken@6113
   712
    }
slouken@6113
   713
};
slouken@6113
   714
slouken@6113
   715
static GLES2_Shader GLES2_FragmentShader_Additive_TextureARGBSrc = {
slouken@6113
   716
    1,
slouken@6113
   717
    {
slouken@6113
   718
        &GLES2_FragmentSrc_TextureARGBSrc
slouken@6113
   719
    }
slouken@6113
   720
};
slouken@6113
   721
slouken@6113
   722
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureARGBSrc = {
slouken@6113
   723
    1,
slouken@6113
   724
    {
slouken@6113
   725
        &GLES2_FragmentSrc_TextureARGBSrc
slouken@6113
   726
    }
slouken@6113
   727
};
slouken@6113
   728
slouken@6113
   729
static GLES2_Shader GLES2_FragmentShader_None_TextureRGBSrc = {
slouken@6113
   730
    1,
slouken@6113
   731
    {
slouken@6113
   732
        &GLES2_FragmentSrc_TextureRGBSrc
slouken@6113
   733
    }
slouken@6113
   734
};
slouken@6113
   735
slouken@6113
   736
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureRGBSrc = {
slouken@6113
   737
    1,
slouken@6113
   738
    {
slouken@6113
   739
        &GLES2_FragmentSrc_TextureRGBSrc
slouken@6113
   740
    }
slouken@6113
   741
};
slouken@6113
   742
slouken@6113
   743
static GLES2_Shader GLES2_FragmentShader_Additive_TextureRGBSrc = {
slouken@6113
   744
    1,
slouken@6113
   745
    {
slouken@6113
   746
        &GLES2_FragmentSrc_TextureRGBSrc
slouken@6113
   747
    }
slouken@6113
   748
};
slouken@6113
   749
slouken@6113
   750
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureRGBSrc = {
slouken@6113
   751
    1,
slouken@6113
   752
    {
slouken@6113
   753
        &GLES2_FragmentSrc_TextureRGBSrc
slouken@6113
   754
    }
slouken@6113
   755
};
slouken@6113
   756
slouken@6113
   757
static GLES2_Shader GLES2_FragmentShader_None_TextureBGRSrc = {
slouken@6113
   758
    1,
slouken@6113
   759
    {
slouken@6113
   760
        &GLES2_FragmentSrc_TextureBGRSrc
slouken@6113
   761
    }
slouken@6113
   762
};
slouken@6113
   763
slouken@6113
   764
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureBGRSrc = {
slouken@6113
   765
    1,
slouken@6113
   766
    {
slouken@6113
   767
        &GLES2_FragmentSrc_TextureBGRSrc
slouken@6113
   768
    }
slouken@6113
   769
};
slouken@6113
   770
slouken@6113
   771
static GLES2_Shader GLES2_FragmentShader_Additive_TextureBGRSrc = {
slouken@6113
   772
    1,
slouken@6113
   773
    {
slouken@6113
   774
        &GLES2_FragmentSrc_TextureBGRSrc
slouken@6113
   775
    }
slouken@6113
   776
};
slouken@6113
   777
slouken@6113
   778
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureBGRSrc = {
slouken@6113
   779
    1,
slouken@6113
   780
    {
slouken@6113
   781
        &GLES2_FragmentSrc_TextureBGRSrc
slouken@5201
   782
    }
slouken@5201
   783
};
slouken@5201
   784
slouken@8835
   785
static GLES2_Shader GLES2_FragmentShader_TextureYUVSrc = {
slouken@8835
   786
    1,
slouken@8835
   787
    {
slouken@8835
   788
        &GLES2_FragmentSrc_TextureYUVSrc
slouken@8835
   789
    }
slouken@8835
   790
};
slouken@8835
   791
slouken@9046
   792
static GLES2_Shader GLES2_FragmentShader_TextureNV12Src = {
slouken@9046
   793
    1,
slouken@9046
   794
    {
slouken@9046
   795
        &GLES2_FragmentSrc_TextureNV12Src
slouken@9046
   796
    }
slouken@9046
   797
};
slouken@9046
   798
slouken@9046
   799
static GLES2_Shader GLES2_FragmentShader_TextureNV21Src = {
slouken@9046
   800
    1,
slouken@9046
   801
    {
slouken@9046
   802
        &GLES2_FragmentSrc_TextureNV21Src
slouken@9046
   803
    }
slouken@9046
   804
};
slouken@9046
   805
slouken@8835
   806
slouken@5201
   807
/*************************************************************************************************
slouken@5201
   808
 * Shader selector                                                                               *
slouken@5201
   809
 *************************************************************************************************/
slouken@5201
   810
slouken@5201
   811
const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMode)
slouken@5201
   812
{
slime73@9604
   813
    switch (type) {
slouken@5201
   814
    case GLES2_SHADER_VERTEX_DEFAULT:
slouken@5201
   815
        return &GLES2_VertexShader_Default;
slouken@5201
   816
    case GLES2_SHADER_FRAGMENT_SOLID_SRC:
slime73@9604
   817
    switch (blendMode) {
slouken@6113
   818
    case SDL_BLENDMODE_NONE:
slouken@6113
   819
        return &GLES2_FragmentShader_None_SolidSrc;
slouken@6113
   820
    case SDL_BLENDMODE_BLEND:
slouken@6113
   821
        return &GLES2_FragmentShader_Alpha_SolidSrc;
slouken@6113
   822
    case SDL_BLENDMODE_ADD:
slouken@6113
   823
        return &GLES2_FragmentShader_Additive_SolidSrc;
slouken@6113
   824
    case SDL_BLENDMODE_MOD:
slouken@6113
   825
        return &GLES2_FragmentShader_Modulated_SolidSrc;
slouken@6113
   826
    default:
slouken@6113
   827
        return NULL;
slouken@6113
   828
    }
slouken@6113
   829
    case GLES2_SHADER_FRAGMENT_TEXTURE_ABGR_SRC:
slime73@9604
   830
        switch (blendMode) {
slouken@5201
   831
        case SDL_BLENDMODE_NONE:
slouken@6113
   832
            return &GLES2_FragmentShader_None_TextureABGRSrc;
slouken@5201
   833
        case SDL_BLENDMODE_BLEND:
slouken@6113
   834
            return &GLES2_FragmentShader_Alpha_TextureABGRSrc;
slouken@5201
   835
        case SDL_BLENDMODE_ADD:
slouken@6113
   836
            return &GLES2_FragmentShader_Additive_TextureABGRSrc;
slouken@5201
   837
        case SDL_BLENDMODE_MOD:
slouken@6113
   838
            return &GLES2_FragmentShader_Modulated_TextureABGRSrc;
slouken@5201
   839
        default:
slouken@5201
   840
            return NULL;
slouken@6113
   841
    }
slouken@6113
   842
    case GLES2_SHADER_FRAGMENT_TEXTURE_ARGB_SRC:
slime73@9604
   843
        switch (blendMode) {
slouken@5201
   844
        case SDL_BLENDMODE_NONE:
slouken@6113
   845
            return &GLES2_FragmentShader_None_TextureARGBSrc;
slouken@5201
   846
        case SDL_BLENDMODE_BLEND:
slouken@6113
   847
            return &GLES2_FragmentShader_Alpha_TextureARGBSrc;
slouken@5201
   848
        case SDL_BLENDMODE_ADD:
slouken@6113
   849
            return &GLES2_FragmentShader_Additive_TextureARGBSrc;
slouken@5201
   850
        case SDL_BLENDMODE_MOD:
slouken@6113
   851
            return &GLES2_FragmentShader_Modulated_TextureARGBSrc;
slouken@5201
   852
        default:
slouken@5201
   853
            return NULL;
slouken@6113
   854
    }
slouken@7191
   855
slouken@6113
   856
    case GLES2_SHADER_FRAGMENT_TEXTURE_RGB_SRC:
slime73@9604
   857
        switch (blendMode) {
slouken@6113
   858
        case SDL_BLENDMODE_NONE:
slouken@6113
   859
            return &GLES2_FragmentShader_None_TextureRGBSrc;
slouken@6113
   860
        case SDL_BLENDMODE_BLEND:
slouken@6113
   861
            return &GLES2_FragmentShader_Alpha_TextureRGBSrc;
slouken@6113
   862
        case SDL_BLENDMODE_ADD:
slouken@6113
   863
            return &GLES2_FragmentShader_Additive_TextureRGBSrc;
slouken@6113
   864
        case SDL_BLENDMODE_MOD:
slouken@6113
   865
            return &GLES2_FragmentShader_Modulated_TextureRGBSrc;
slouken@6113
   866
        default:
slouken@6113
   867
            return NULL;
slouken@6113
   868
    }
slouken@7191
   869
slouken@6113
   870
    case GLES2_SHADER_FRAGMENT_TEXTURE_BGR_SRC:
slime73@9604
   871
        switch (blendMode) {
slouken@6113
   872
        case SDL_BLENDMODE_NONE:
slouken@6113
   873
            return &GLES2_FragmentShader_None_TextureBGRSrc;
slouken@6113
   874
        case SDL_BLENDMODE_BLEND:
slouken@6113
   875
            return &GLES2_FragmentShader_Alpha_TextureBGRSrc;
slouken@6113
   876
        case SDL_BLENDMODE_ADD:
slouken@6113
   877
            return &GLES2_FragmentShader_Additive_TextureBGRSrc;
slouken@6113
   878
        case SDL_BLENDMODE_MOD:
slouken@6113
   879
            return &GLES2_FragmentShader_Modulated_TextureBGRSrc;
slouken@6113
   880
        default:
slouken@6113
   881
            return NULL;
slouken@6113
   882
    }
slouken@8835
   883
    
slouken@8835
   884
    case GLES2_SHADER_FRAGMENT_TEXTURE_YUV_SRC:
slouken@8835
   885
    {
slouken@8835
   886
        return &GLES2_FragmentShader_TextureYUVSrc;
slouken@8835
   887
    }
slouken@7191
   888
slouken@9046
   889
    case GLES2_SHADER_FRAGMENT_TEXTURE_NV12_SRC:
slouken@9046
   890
    {
slouken@9046
   891
        return &GLES2_FragmentShader_TextureNV12Src;
slouken@9046
   892
    }
slouken@9046
   893
slouken@9046
   894
    case GLES2_SHADER_FRAGMENT_TEXTURE_NV21_SRC:
slouken@9046
   895
    {
slouken@9046
   896
        return &GLES2_FragmentShader_TextureNV21Src;
slouken@9046
   897
    }
slouken@9046
   898
slouken@5201
   899
    default:
slouken@5201
   900
        return NULL;
slouken@5201
   901
    }
slouken@5201
   902
}
slouken@5201
   903
slouken@5226
   904
#endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */
slouken@5201
   905
slouken@5201
   906
/* vi: set ts=4 sw=4 expandtab: */