Skip to content

Instantly share code, notes, and snippets.

@Themaister
Created November 15, 2012 22:51
Show Gist options
  • Save Themaister/4082074 to your computer and use it in GitHub Desktop.
Save Themaister/4082074 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!-- XML/GLSL shader autogenerated by cg2xml.py -->
<shader language="GLSL" style="GLES2">
<vertex><![CDATA[
varying vec2 pixel_no;
varying vec2 c11;
varying vec4 c12_22;
varying vec4 c21_02;
varying vec4 c20_01;
varying vec4 c00_10;
struct tex_coord {
vec4 c00_10;
vec4 c20_01;
vec4 c21_02;
vec4 c12_22;
vec2 c11;
vec2 pixel_no;
};
struct input_ {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_size;
};
vec4 _oPosition1;
tex_coord _coords1;
uniform mat4 rubyMVPMatrix;
uniform input_ _IN1;
vec4 _r0015;
attribute vec4 rubyVertexCoord;
attribute vec4 COLOR;
varying vec4 COL0;
attribute vec4 rubyTexCoord;
mat4 transpose_(mat4 matrix)
{
mat4 ret;
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
ret[i][j] = matrix[j][i];
return ret;
}
uniform vec2 rubyOutputSize;
uniform vec2 rubyTextureSize;
uniform vec2 rubyInputSize;
void main()
{
mat4 rubyMVPMatrix_ = transpose_(rubyMVPMatrix);
vec4 _oColor;
float _dx;
float _dy;
vec2 _TMP5;
vec2 _TMP6;
vec2 _TMP7;
vec2 _TMP8;
vec2 _TMP9;
vec2 _TMP10;
vec2 _TMP11;
vec2 _TMP12;
tex_coord _TMP13;
_r0015.x = dot(rubyMVPMatrix_[0], rubyVertexCoord);
_r0015.y = dot(rubyMVPMatrix_[1], rubyVertexCoord);
_r0015.z = dot(rubyMVPMatrix_[2], rubyVertexCoord);
_r0015.w = dot(rubyMVPMatrix_[3], rubyVertexCoord);
_oPosition1 = _r0015;
_oColor = COLOR;
_dx = 1.00000000E+00/rubyTextureSize.x;
_dy = 1.00000000E+00/rubyTextureSize.y;
_TMP11 = rubyTexCoord.xy + vec2(-_dx, -_dy);
_TMP12 = rubyTexCoord.xy + vec2(0.00000000E+00, -_dy);
_TMP13.c00_10 = vec4(_TMP11.x, _TMP11.y, _TMP12.x, _TMP12.y);
_TMP9 = rubyTexCoord.xy + vec2(_dx, -_dy);
_TMP10 = rubyTexCoord.xy + vec2(-_dx, 0.00000000E+00);
_TMP13.c20_01 = vec4(_TMP9.x, _TMP9.y, _TMP10.x, _TMP10.y);
_TMP7 = rubyTexCoord.xy + vec2(_dx, 0.00000000E+00);
_TMP8 = rubyTexCoord.xy + vec2(-_dx, _dy);
_TMP13.c21_02 = vec4(_TMP7.x, _TMP7.y, _TMP8.x, _TMP8.y);
_TMP5 = rubyTexCoord.xy + vec2(0.00000000E+00, _dy);
_TMP6 = rubyTexCoord.xy + vec2(_dx, _dy);
_TMP13.c12_22 = vec4(_TMP5.x, _TMP5.y, _TMP6.x, _TMP6.y);
_TMP13.pixel_no = rubyTexCoord.xy*rubyTextureSize;
c00_10 = _TMP13.c00_10;
c20_01 = _TMP13.c20_01;
c21_02 = _TMP13.c21_02;
c12_22 = _TMP13.c12_22;
c11 = rubyTexCoord.xy;
pixel_no = _TMP13.pixel_no;
gl_Position = _r0015;
COL0 = COLOR;
}
]]></vertex>
<fragment><![CDATA[
#ifdef GL_ES
precision mediump float;
#endif
varying vec2 pixel_no;
varying vec2 c11;
varying vec4 c12_22;
varying vec4 c21_02;
varying vec4 c20_01;
varying vec4 c00_10;
struct tex_coord {
vec4 c00_10;
vec4 c20_01;
vec4 c21_02;
vec4 c12_22;
vec2 c11;
vec2 pixel_no;
};
struct input_ {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_size;
};
vec4 _ret_0;
vec3 _TMP16;
vec4 _TMP15;
vec2 _TMP17;
float _TMP20;
float _TMP21;
vec3 _TMP14;
vec4 _TMP13;
vec3 _TMP12;
vec4 _TMP11;
vec3 _TMP10;
vec4 _TMP9;
vec3 _TMP8;
vec4 _TMP7;
vec3 _TMP6;
vec4 _TMP5;
vec3 _TMP4;
vec4 _TMP3;
vec3 _TMP2;
vec4 _TMP1;
vec4 _TMP0;
tex_coord _co1;
uniform sampler2D rubyTexture;
float _TMP34;
vec2 _delta0035;
float _TMP42;
float _bright0043;
float _TMP48;
float _x0049;
float _TMP58;
vec2 _delta0059;
float _TMP66;
float _bright0067;
float _TMP72;
float _x0073;
float _TMP82;
vec2 _delta0083;
float _TMP90;
float _bright0091;
float _TMP96;
float _x0097;
float _TMP106;
vec2 _delta0107;
float _TMP114;
float _bright0115;
float _TMP120;
float _x0121;
float _TMP130;
vec2 _delta0131;
float _TMP138;
float _bright0139;
float _TMP144;
float _x0145;
float _TMP154;
vec2 _delta0155;
float _TMP162;
float _bright0163;
float _TMP168;
float _x0169;
float _TMP178;
vec2 _delta0179;
float _TMP186;
float _bright0187;
float _TMP192;
float _x0193;
float _TMP202;
vec2 _delta0203;
float _TMP210;
float _bright0211;
float _TMP216;
float _x0217;
float _TMP226;
vec2 _delta0227;
float _TMP234;
float _bright0235;
float _TMP240;
float _x0241;
vec3 _a0245;
uniform vec2 rubyOutputSize;
uniform vec2 rubyTextureSize;
uniform vec2 rubyInputSize;
void main()
{
vec3 _mid_color;
vec3 _color2;
vec3 _out_color;
_TMP0 = texture2D(rubyTexture, c11);
_TMP17 = fract(pixel_no);
_delta0035 = _TMP17 - vec2( 5.00000000E-01, 5.00000000E-01);
_TMP20 = dot(_delta0035, _delta0035);
_TMP21 = inversesqrt(_TMP20);
_TMP34 = 1.00000000E+00/_TMP21;
_bright0043 = dot(_TMP0.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP42 = 1.04999995E+00 + _bright0043*-9.99999642E-02;
_x0049 = -2.40000010E+00*_TMP34*_TMP42;
_TMP48 = pow(2.71828198E+00, _x0049);
_mid_color = _TMP0.xyz*_TMP48;
_TMP1 = texture2D(rubyTexture, c00_10.xy);
_TMP17 = fract(pixel_no);
_delta0059 = _TMP17 - vec2( -5.00000000E-01, -5.00000000E-01);
_TMP20 = dot(_delta0059, _delta0059);
_TMP21 = inversesqrt(_TMP20);
_TMP58 = 1.00000000E+00/_TMP21;
_bright0067 = dot(_TMP1.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP66 = 1.04999995E+00 + _bright0067*-9.99999642E-02;
_x0073 = -2.40000010E+00*_TMP58*_TMP66;
_TMP72 = pow(2.71828198E+00, _x0073);
_TMP2 = _TMP1.xyz*_TMP72;
_TMP3 = texture2D(rubyTexture, c00_10.zw);
_TMP17 = fract(pixel_no);
_delta0083 = _TMP17 - vec2( 5.00000000E-01, -5.00000000E-01);
_TMP20 = dot(_delta0083, _delta0083);
_TMP21 = inversesqrt(_TMP20);
_TMP82 = 1.00000000E+00/_TMP21;
_bright0091 = dot(_TMP3.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP90 = 1.04999995E+00 + _bright0091*-9.99999642E-02;
_x0097 = -2.40000010E+00*_TMP82*_TMP90;
_TMP96 = pow(2.71828198E+00, _x0097);
_TMP4 = _TMP3.xyz*_TMP96;
_color2 = _TMP2 + _TMP4;
_TMP5 = texture2D(rubyTexture, c20_01.xy);
_TMP17 = fract(pixel_no);
_delta0107 = _TMP17 - vec2( 1.50000000E+00, -5.00000000E-01);
_TMP20 = dot(_delta0107, _delta0107);
_TMP21 = inversesqrt(_TMP20);
_TMP106 = 1.00000000E+00/_TMP21;
_bright0115 = dot(_TMP5.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP114 = 1.04999995E+00 + _bright0115*-9.99999642E-02;
_x0121 = -2.40000010E+00*_TMP106*_TMP114;
_TMP120 = pow(2.71828198E+00, _x0121);
_TMP6 = _TMP5.xyz*_TMP120;
_color2 = _color2 + _TMP6;
_TMP7 = texture2D(rubyTexture, c20_01.zw);
_TMP17 = fract(pixel_no);
_delta0131 = _TMP17 - vec2( -5.00000000E-01, 5.00000000E-01);
_TMP20 = dot(_delta0131, _delta0131);
_TMP21 = inversesqrt(_TMP20);
_TMP130 = 1.00000000E+00/_TMP21;
_bright0139 = dot(_TMP7.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP138 = 1.04999995E+00 + _bright0139*-9.99999642E-02;
_x0145 = -2.40000010E+00*_TMP130*_TMP138;
_TMP144 = pow(2.71828198E+00, _x0145);
_TMP8 = _TMP7.xyz*_TMP144;
_color2 = _color2 + _TMP8;
_color2 = _color2 + _mid_color;
_TMP9 = texture2D(rubyTexture, c21_02.xy);
_TMP17 = fract(pixel_no);
_delta0155 = _TMP17 - vec2( 1.50000000E+00, 5.00000000E-01);
_TMP20 = dot(_delta0155, _delta0155);
_TMP21 = inversesqrt(_TMP20);
_TMP154 = 1.00000000E+00/_TMP21;
_bright0163 = dot(_TMP9.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP162 = 1.04999995E+00 + _bright0163*-9.99999642E-02;
_x0169 = -2.40000010E+00*_TMP154*_TMP162;
_TMP168 = pow(2.71828198E+00, _x0169);
_TMP10 = _TMP9.xyz*_TMP168;
_color2 = _color2 + _TMP10;
_TMP11 = texture2D(rubyTexture, c21_02.zw);
_TMP17 = fract(pixel_no);
_delta0179 = _TMP17 - vec2( -5.00000000E-01, 1.50000000E+00);
_TMP20 = dot(_delta0179, _delta0179);
_TMP21 = inversesqrt(_TMP20);
_TMP178 = 1.00000000E+00/_TMP21;
_bright0187 = dot(_TMP11.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP186 = 1.04999995E+00 + _bright0187*-9.99999642E-02;
_x0193 = -2.40000010E+00*_TMP178*_TMP186;
_TMP192 = pow(2.71828198E+00, _x0193);
_TMP12 = _TMP11.xyz*_TMP192;
_color2 = _color2 + _TMP12;
_TMP13 = texture2D(rubyTexture, c12_22.xy);
_TMP17 = fract(pixel_no);
_delta0203 = _TMP17 - vec2( 5.00000000E-01, 1.50000000E+00);
_TMP20 = dot(_delta0203, _delta0203);
_TMP21 = inversesqrt(_TMP20);
_TMP202 = 1.00000000E+00/_TMP21;
_bright0211 = dot(_TMP13.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP210 = 1.04999995E+00 + _bright0211*-9.99999642E-02;
_x0217 = -2.40000010E+00*_TMP202*_TMP210;
_TMP216 = pow(2.71828198E+00, _x0217);
_TMP14 = _TMP13.xyz*_TMP216;
_color2 = _color2 + _TMP14;
_TMP15 = texture2D(rubyTexture, c12_22.zw);
_TMP17 = fract(pixel_no);
_delta0227 = _TMP17 - vec2( 1.50000000E+00, 1.50000000E+00);
_TMP20 = dot(_delta0227, _delta0227);
_TMP21 = inversesqrt(_TMP20);
_TMP226 = 1.00000000E+00/_TMP21;
_bright0235 = dot(_TMP15.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP234 = 1.04999995E+00 + _bright0235*-9.99999642E-02;
_x0241 = -2.40000010E+00*_TMP226*_TMP234;
_TMP240 = pow(2.71828198E+00, _x0241);
_TMP16 = _TMP15.xyz*_TMP240;
_color2 = _color2 + _TMP16;
_a0245 = 1.20000005E+00*_mid_color;
_out_color = _a0245 + 6.49999976E-01*(_color2 - _a0245);
_ret_0 = vec4(_out_color.x, _out_color.y, _out_color.z, 1.00000000E+00);
gl_FragColor = _ret_0;
return;
}
]]></fragment>
<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment