daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest May 30th, 2015 414 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // GLSL shader autogenerated by cg2glsl.py.
  2. #if defined(VERTEX)
  3.  
  4. #if __VERSION__ >= 130
  5. #define COMPAT_VARYING out
  6. #define COMPAT_ATTRIBUTE in
  7. #define COMPAT_TEXTURE texture
  8. #else
  9. #define COMPAT_VARYING varying
  10. #define COMPAT_ATTRIBUTE attribute
  11. #define COMPAT_TEXTURE texture2D
  12. #endif
  13.  
  14. #ifdef GL_ES
  15. #define COMPAT_PRECISION mediump
  16. #else
  17. #define COMPAT_PRECISION
  18. #endif
  19. COMPAT_VARYING     vec4 _col;
  20. COMPAT_VARYING     float _frame_rotation;
  21. COMPAT_VARYING     vec2 _texCoord_size;
  22. struct input_dummy {
  23.     vec2 _video_size;
  24.     vec2 _texCoord_size;
  25.     vec2 _output_dummy_size;
  26.     float _frame_count;
  27.     float _frame_direction;
  28.     float _frame_rotation;
  29.     vec2 _texture_size;
  30. float _placeholder24;
  31. };
  32. struct output_dummy {
  33.     vec4 _col;
  34. };
  35. vec4 _oPosition1;
  36. vec4 _r0005;
  37. COMPAT_ATTRIBUTE vec4 VertexCoord;
  38. COMPAT_ATTRIBUTE vec4 TexCoord;
  39. COMPAT_VARYING vec4 TEX0;
  40.  
  41. uniform mat4 MVPMatrix;
  42. uniform int FrameDirection;
  43. uniform int FrameCount;
  44. uniform COMPAT_PRECISION vec2 OutputSize;
  45. uniform COMPAT_PRECISION vec2 TextureSize;
  46. uniform COMPAT_PRECISION vec2 InputSize;
  47. void main()
  48. {
  49.     vec2 _otexCoord;
  50.     _r0005 = VertexCoord.x*MVPMatrix[0];
  51.     _r0005 = _r0005 + VertexCoord.y*MVPMatrix[1];
  52.     _r0005 = _r0005 + VertexCoord.z*MVPMatrix[2];
  53.     _r0005 = _r0005 + VertexCoord.w*MVPMatrix[3];
  54.     _oPosition1 = _r0005;
  55.     _otexCoord = TexCoord.xy;
  56.     gl_Position = _r0005;
  57.     TEX0.xy = TexCoord.xy;
  58. }
  59. #elif defined(FRAGMENT)
  60.  
  61. #if __VERSION__ >= 130
  62. #define COMPAT_VARYING in
  63. #define COMPAT_TEXTURE texture
  64. out vec4 FragColor;
  65. #else
  66. #define COMPAT_VARYING varying
  67. #define FragColor gl_FragColor
  68. #define COMPAT_TEXTURE texture2D
  69. #endif
  70.  
  71. #ifdef GL_ES
  72. #ifdef GL_FRAGMENT_PRECISION_HIGH
  73. precision highp float;
  74. #else
  75. precision mediump float;
  76. #endif
  77. #define COMPAT_PRECISION mediump
  78. #else
  79. #define COMPAT_PRECISION
  80. #endif
  81. COMPAT_VARYING     vec4 _col;
  82. COMPAT_VARYING     float _frame_rotation;
  83. COMPAT_VARYING     vec2 _texCoord_size;
  84. struct input_dummy {
  85.     vec2 _video_size;
  86.     vec2 _texCoord_size;
  87.     vec2 _output_dummy_size;
  88.     float _frame_count;
  89.     float _frame_direction;
  90.     float _frame_rotation;
  91.     vec2 _texture_size;
  92. float _placeholder30;
  93. };
  94. struct output_dummy {
  95.     vec4 _col;
  96. };
  97. float _TMP24;
  98. float _TMP23;
  99. float _TMP22;
  100. float _TMP21;
  101. vec2 _TMP25;
  102. vec4 _TMP17;
  103. vec4 _TMP16;
  104. vec2 _TMP15;
  105. vec4 _TMP14;
  106. vec4 _TMP13;
  107. vec2 _TMP12;
  108. vec4 _TMP11;
  109. vec4 _TMP10;
  110. vec2 _TMP9;
  111. vec4 _TMP8;
  112. vec4 _TMP7;
  113. vec2 _TMP6;
  114. float _TMP5;
  115. float _TMP4;
  116. float _TMP3;
  117. float _TMP20;
  118. float _TMP19;
  119. float _TMP26;
  120. float _TMP2;
  121. float _TMP1;
  122. float _TMP0;
  123. float _TMP18;
  124. input_dummy _IN1;
  125. float _x0030;
  126. float _x0032;
  127. float _x0034;
  128. float _TMP35;
  129. float _x0036;
  130. float _TMP41;
  131. float _x0042;
  132. float _z20048;
  133. float _z40048;
  134. float _z80048;
  135. float _z20050;
  136. float _z40050;
  137. float _z80050;
  138. float _TMP53;
  139. float _x0054;
  140. float _TMP59;
  141. float _x0060;
  142. float _z20066;
  143. float _z40066;
  144. float _z80066;
  145. float _z20068;
  146. float _z40068;
  147. float _z80068;
  148. float _x0070;
  149. float _TMP71;
  150. float _x0072;
  151. float _TMP77;
  152. float _x0078;
  153. float _z20084;
  154. float _z40084;
  155. float _z80084;
  156. float _z20086;
  157. float _z40086;
  158. float _z80086;
  159. float _x0088;
  160. float _TMP89;
  161. float _x0090;
  162. float _TMP95;
  163. float _x0096;
  164. float _z20102;
  165. float _z40102;
  166. float _z80102;
  167. float _z20104;
  168. float _z40104;
  169. float _z80104;
  170. float _x0106;
  171. float _TMP107;
  172. float _x0108;
  173. float _TMP113;
  174. float _x0114;
  175. float _z20120;
  176. float _z40120;
  177. float _z80120;
  178. float _z20122;
  179. float _z40122;
  180. float _z80122;
  181. float _x0124;
  182. float _TMP125;
  183. float _x0126;
  184. float _TMP131;
  185. float _x0132;
  186. float _z20138;
  187. float _z40138;
  188. float _z80138;
  189. float _z20140;
  190. float _z40140;
  191. float _z80140;
  192. vec2 _x0142;
  193. vec2 _c0144;
  194. vec2 _x0156;
  195. vec2 _c0158;
  196. vec2 _x0170;
  197. vec2 _c0172;
  198. vec2 _x0184;
  199. vec2 _c0186;
  200. vec2 _x0198;
  201. vec2 _TMP199;
  202. vec2 _b0200;
  203. vec2 _x0200;
  204. vec2 _a0200;
  205. vec2 _TMP205;
  206. vec2 _b0206;
  207. vec2 _x0206;
  208. vec2 _a0206;
  209. COMPAT_VARYING vec4 TEX0;
  210.  
  211. uniform sampler2D Texture;
  212. uniform int FrameDirection;
  213. uniform int FrameCount;
  214. uniform COMPAT_PRECISION vec2 OutputSize;
  215. uniform COMPAT_PRECISION vec2 TextureSize;
  216. uniform COMPAT_PRECISION vec2 InputSize;
  217. void main()
  218. {
  219.     vec2 _texelSize;
  220.     vec2 _subtexelSize;
  221.     vec2 _range;
  222.     float _left;
  223.     float _top;
  224.     float _right;
  225.     float _bottom;
  226.     vec4 _lcol;
  227.     vec4 _rcol;
  228.     float _subpix;
  229.     float _rsubpix;
  230.     vec4 _topLeftColor;
  231.     vec4 _bottomRightColor;
  232.     vec4 _bottomLeftColor;
  233.     vec4 _topRightColor;
  234.     vec2 _border;
  235.     float _totalArea;
  236.     vec4 _averageColor;
  237.     output_dummy _OUT;
  238.     _texelSize = 1.00000000E+00/TextureSize;
  239.     _subtexelSize = _texelSize/vec2( 3.00000000E+00, 1.00000000E+00);
  240.     _range = InputSize/(OutputSize*TextureSize);
  241.     _left = TEX0.x - _texelSize.x*5.00000000E-01;
  242.     _top = TEX0.y + _range.y;
  243.     _right = TEX0.x + _texelSize.x*5.00000000E-01;
  244.     _bottom = TEX0.y - _range.y;
  245.     _x0030 = TEX0.x/_subtexelSize.x + 1.50000000E+00;
  246.     _x0032 = _x0030/3.00000000E+00;
  247.     _TMP18 = floor(_x0032);
  248.     _subpix = _x0030 - 3.00000000E+00*_TMP18;
  249.     _rsubpix = _range.x/_subtexelSize.x;
  250.     _x0034 = _subpix + 1.00000000E+00;
  251.     _x0036 = (_x0034 - _rsubpix)/1.50000000E+00;
  252.     _TMP26 = min(1.00000000E+00, _x0036);
  253.     _TMP35 = max(-1.00000000E+00, _TMP26);
  254.     _x0042 = (_x0034 + _rsubpix)/1.50000000E+00;
  255.     _TMP26 = min(1.00000000E+00, _x0042);
  256.     _TMP41 = max(-1.00000000E+00, _TMP26);
  257.     _z20048 = _TMP41*_TMP41;
  258.     _z40048 = _z20048*_z20048;
  259.     _z80048 = _z40048*_z40048;
  260.     _TMP19 = (((((_TMP41 - 6.66666687E-01*_TMP41*_z20048) - 2.00000003E-01*_TMP41*_z40048) + 5.71428597E-01*_TMP41*_z20048*_z40048) - 1.11111112E-01*_TMP41*_z80048) - 1.81818187E-01*_TMP41*_z20048*_z80048) + 7.69230798E-02*_TMP41*_z40048*_z80048;
  261.     _z20050 = _TMP35*_TMP35;
  262.     _z40050 = _z20050*_z20050;
  263.     _z80050 = _z40050*_z40050;
  264.     _TMP20 = (((((_TMP35 - 6.66666687E-01*_TMP35*_z20050) - 2.00000003E-01*_TMP35*_z40050) + 5.71428597E-01*_TMP35*_z20050*_z40050) - 1.11111112E-01*_TMP35*_z80050) - 1.81818187E-01*_TMP35*_z20050*_z80050) + 7.69230798E-02*_TMP35*_z40050*_z80050;
  265.     _TMP0 = (1.50000000E+00*(_TMP19 - _TMP20))/(2.00000000E+00*_rsubpix);
  266.     _x0054 = (_subpix - _rsubpix)/1.50000000E+00;
  267.     _TMP26 = min(1.00000000E+00, _x0054);
  268.     _TMP53 = max(-1.00000000E+00, _TMP26);
  269.     _x0060 = (_subpix + _rsubpix)/1.50000000E+00;
  270.     _TMP26 = min(1.00000000E+00, _x0060);
  271.     _TMP59 = max(-1.00000000E+00, _TMP26);
  272.     _z20066 = _TMP59*_TMP59;
  273.     _z40066 = _z20066*_z20066;
  274.     _z80066 = _z40066*_z40066;
  275.     _TMP19 = (((((_TMP59 - 6.66666687E-01*_TMP59*_z20066) - 2.00000003E-01*_TMP59*_z40066) + 5.71428597E-01*_TMP59*_z20066*_z40066) - 1.11111112E-01*_TMP59*_z80066) - 1.81818187E-01*_TMP59*_z20066*_z80066) + 7.69230798E-02*_TMP59*_z40066*_z80066;
  276.     _z20068 = _TMP53*_TMP53;
  277.     _z40068 = _z20068*_z20068;
  278.     _z80068 = _z40068*_z40068;
  279.     _TMP20 = (((((_TMP53 - 6.66666687E-01*_TMP53*_z20068) - 2.00000003E-01*_TMP53*_z40068) + 5.71428597E-01*_TMP53*_z20068*_z40068) - 1.11111112E-01*_TMP53*_z80068) - 1.81818187E-01*_TMP53*_z20068*_z80068) + 7.69230798E-02*_TMP53*_z40068*_z80068;
  280.     _TMP1 = (1.50000000E+00*(_TMP19 - _TMP20))/(2.00000000E+00*_rsubpix);
  281.     _x0070 = _subpix - 1.00000000E+00;
  282.     _x0072 = (_x0070 - _rsubpix)/1.50000000E+00;
  283.     _TMP26 = min(1.00000000E+00, _x0072);
  284.     _TMP71 = max(-1.00000000E+00, _TMP26);
  285.     _x0078 = (_x0070 + _rsubpix)/1.50000000E+00;
  286.     _TMP26 = min(1.00000000E+00, _x0078);
  287.     _TMP77 = max(-1.00000000E+00, _TMP26);
  288.     _z20084 = _TMP77*_TMP77;
  289.     _z40084 = _z20084*_z20084;
  290.     _z80084 = _z40084*_z40084;
  291.     _TMP19 = (((((_TMP77 - 6.66666687E-01*_TMP77*_z20084) - 2.00000003E-01*_TMP77*_z40084) + 5.71428597E-01*_TMP77*_z20084*_z40084) - 1.11111112E-01*_TMP77*_z80084) - 1.81818187E-01*_TMP77*_z20084*_z80084) + 7.69230798E-02*_TMP77*_z40084*_z80084;
  292.     _z20086 = _TMP71*_TMP71;
  293.     _z40086 = _z20086*_z20086;
  294.     _z80086 = _z40086*_z40086;
  295.     _TMP20 = (((((_TMP71 - 6.66666687E-01*_TMP71*_z20086) - 2.00000003E-01*_TMP71*_z40086) + 5.71428597E-01*_TMP71*_z20086*_z40086) - 1.11111112E-01*_TMP71*_z80086) - 1.81818187E-01*_TMP71*_z20086*_z80086) + 7.69230798E-02*_TMP71*_z40086*_z80086;
  296.     _TMP2 = (1.50000000E+00*(_TMP19 - _TMP20))/(2.00000000E+00*_rsubpix);
  297.     _lcol = vec4(_TMP0, _TMP1, _TMP2, 0.00000000E+00);
  298.     _x0088 = _subpix - 2.00000000E+00;
  299.     _x0090 = (_x0088 - _rsubpix)/1.50000000E+00;
  300.     _TMP26 = min(1.00000000E+00, _x0090);
  301.     _TMP89 = max(-1.00000000E+00, _TMP26);
  302.     _x0096 = (_x0088 + _rsubpix)/1.50000000E+00;
  303.     _TMP26 = min(1.00000000E+00, _x0096);
  304.     _TMP95 = max(-1.00000000E+00, _TMP26);
  305.     _z20102 = _TMP95*_TMP95;
  306.     _z40102 = _z20102*_z20102;
  307.     _z80102 = _z40102*_z40102;
  308.     _TMP19 = (((((_TMP95 - 6.66666687E-01*_TMP95*_z20102) - 2.00000003E-01*_TMP95*_z40102) + 5.71428597E-01*_TMP95*_z20102*_z40102) - 1.11111112E-01*_TMP95*_z80102) - 1.81818187E-01*_TMP95*_z20102*_z80102) + 7.69230798E-02*_TMP95*_z40102*_z80102;
  309.     _z20104 = _TMP89*_TMP89;
  310.     _z40104 = _z20104*_z20104;
  311.     _z80104 = _z40104*_z40104;
  312.     _TMP20 = (((((_TMP89 - 6.66666687E-01*_TMP89*_z20104) - 2.00000003E-01*_TMP89*_z40104) + 5.71428597E-01*_TMP89*_z20104*_z40104) - 1.11111112E-01*_TMP89*_z80104) - 1.81818187E-01*_TMP89*_z20104*_z80104) + 7.69230798E-02*_TMP89*_z40104*_z80104;
  313.     _TMP3 = (1.50000000E+00*(_TMP19 - _TMP20))/(2.00000000E+00*_rsubpix);
  314.     _x0106 = _subpix - 3.00000000E+00;
  315.     _x0108 = (_x0106 - _rsubpix)/1.50000000E+00;
  316.     _TMP26 = min(1.00000000E+00, _x0108);
  317.     _TMP107 = max(-1.00000000E+00, _TMP26);
  318.     _x0114 = (_x0106 + _rsubpix)/1.50000000E+00;
  319.     _TMP26 = min(1.00000000E+00, _x0114);
  320.     _TMP113 = max(-1.00000000E+00, _TMP26);
  321.     _z20120 = _TMP113*_TMP113;
  322.     _z40120 = _z20120*_z20120;
  323.     _z80120 = _z40120*_z40120;
  324.     _TMP19 = (((((_TMP113 - 6.66666687E-01*_TMP113*_z20120) - 2.00000003E-01*_TMP113*_z40120) + 5.71428597E-01*_TMP113*_z20120*_z40120) - 1.11111112E-01*_TMP113*_z80120) - 1.81818187E-01*_TMP113*_z20120*_z80120) + 7.69230798E-02*_TMP113*_z40120*_z80120;
  325.     _z20122 = _TMP107*_TMP107;
  326.     _z40122 = _z20122*_z20122;
  327.     _z80122 = _z40122*_z40122;
  328.     _TMP20 = (((((_TMP107 - 6.66666687E-01*_TMP107*_z20122) - 2.00000003E-01*_TMP107*_z40122) + 5.71428597E-01*_TMP107*_z20122*_z40122) - 1.11111112E-01*_TMP107*_z80122) - 1.81818187E-01*_TMP107*_z20122*_z80122) + 7.69230798E-02*_TMP107*_z40122*_z80122;
  329.     _TMP4 = (1.50000000E+00*(_TMP19 - _TMP20))/(2.00000000E+00*_rsubpix);
  330.     _x0124 = _subpix - 4.00000000E+00;
  331.     _x0126 = (_x0124 - _rsubpix)/1.50000000E+00;
  332.     _TMP26 = min(1.00000000E+00, _x0126);
  333.     _TMP125 = max(-1.00000000E+00, _TMP26);
  334.     _x0132 = (_x0124 + _rsubpix)/1.50000000E+00;
  335.     _TMP26 = min(1.00000000E+00, _x0132);
  336.     _TMP131 = max(-1.00000000E+00, _TMP26);
  337.     _z20138 = _TMP131*_TMP131;
  338.     _z40138 = _z20138*_z20138;
  339.     _z80138 = _z40138*_z40138;
  340.     _TMP19 = (((((_TMP131 - 6.66666687E-01*_TMP131*_z20138) - 2.00000003E-01*_TMP131*_z40138) + 5.71428597E-01*_TMP131*_z20138*_z40138) - 1.11111112E-01*_TMP131*_z80138) - 1.81818187E-01*_TMP131*_z20138*_z80138) + 7.69230798E-02*_TMP131*_z40138*_z80138;
  341.     _z20140 = _TMP125*_TMP125;
  342.     _z40140 = _z20140*_z20140;
  343.     _z80140 = _z40140*_z40140;
  344.     _TMP20 = (((((_TMP125 - 6.66666687E-01*_TMP125*_z20140) - 2.00000003E-01*_TMP125*_z40140) + 5.71428597E-01*_TMP125*_z20140*_z40140) - 1.11111112E-01*_TMP125*_z80140) - 1.81818187E-01*_TMP125*_z20140*_z80140) + 7.69230798E-02*_TMP125*_z40140*_z80140;
  345.     _TMP5 = (1.50000000E+00*(_TMP19 - _TMP20))/(2.00000000E+00*_rsubpix);
  346.     _rcol = vec4(_TMP3, _TMP4, _TMP5, 0.00000000E+00);
  347.     _x0142 = vec2(_left, _top)/_texelSize;
  348.     _TMP6 = floor(_x0142);
  349.     _c0144 = (_TMP6 + 5.00000000E-01)*_texelSize;
  350.     _TMP7 = COMPAT_TEXTURE(Texture, _c0144);
  351.     _TMP21 = pow(_TMP7.x, 2.20000005E+00);
  352.     _TMP22 = pow(_TMP7.y, 2.20000005E+00);
  353.     _TMP23 = pow(_TMP7.z, 2.20000005E+00);
  354.     _TMP24 = pow(_TMP7.w, 2.20000005E+00);
  355.     _TMP8 = vec4(_TMP21, _TMP22, _TMP23, _TMP24);
  356.     _topLeftColor = _TMP8*_lcol;
  357.     _x0156 = vec2(_right, _bottom)/_texelSize;
  358.     _TMP9 = floor(_x0156);
  359.     _c0158 = (_TMP9 + 5.00000000E-01)*_texelSize;
  360.     _TMP10 = COMPAT_TEXTURE(Texture, _c0158);
  361.     _TMP21 = pow(_TMP10.x, 2.20000005E+00);
  362.     _TMP22 = pow(_TMP10.y, 2.20000005E+00);
  363.     _TMP23 = pow(_TMP10.z, 2.20000005E+00);
  364.     _TMP24 = pow(_TMP10.w, 2.20000005E+00);
  365.     _TMP11 = vec4(_TMP21, _TMP22, _TMP23, _TMP24);
  366.     _bottomRightColor = _TMP11*_rcol;
  367.     _x0170 = vec2(_left, _bottom)/_texelSize;
  368.     _TMP12 = floor(_x0170);
  369.     _c0172 = (_TMP12 + 5.00000000E-01)*_texelSize;
  370.     _TMP13 = COMPAT_TEXTURE(Texture, _c0172);
  371.     _TMP21 = pow(_TMP13.x, 2.20000005E+00);
  372.     _TMP22 = pow(_TMP13.y, 2.20000005E+00);
  373.     _TMP23 = pow(_TMP13.z, 2.20000005E+00);
  374.     _TMP24 = pow(_TMP13.w, 2.20000005E+00);
  375.     _TMP14 = vec4(_TMP21, _TMP22, _TMP23, _TMP24);
  376.     _bottomLeftColor = _TMP14*_lcol;
  377.     _x0184 = vec2(_right, _top)/_texelSize;
  378.     _TMP15 = floor(_x0184);
  379.     _c0186 = (_TMP15 + 5.00000000E-01)*_texelSize;
  380.     _TMP16 = COMPAT_TEXTURE(Texture, _c0186);
  381.     _TMP21 = pow(_TMP16.x, 2.20000005E+00);
  382.     _TMP22 = pow(_TMP16.y, 2.20000005E+00);
  383.     _TMP23 = pow(_TMP16.z, 2.20000005E+00);
  384.     _TMP24 = pow(_TMP16.w, 2.20000005E+00);
  385.     _TMP17 = vec4(_TMP21, _TMP22, _TMP23, _TMP24);
  386.     _topRightColor = _TMP17*_rcol;
  387.     _x0198 = TEX0.xy/_subtexelSize + 5.00000000E-01;
  388.     _border = floor(_x0198);
  389.     _x0200 = (_border + vec2( 0.00000000E+00, 5.00000007E-02))*_subtexelSize;
  390.     _a0200 = vec2(_left, _bottom);
  391.     _b0200 = vec2(_right, _top);
  392.     _TMP25 = min(_b0200, _x0200);
  393.     _TMP199 = max(_a0200, _TMP25);
  394.     _x0206 = (_border + vec2( 0.00000000E+00, -5.00000007E-02))*_subtexelSize;
  395.     _a0206 = vec2(_left, _bottom);
  396.     _b0206 = vec2(_right, _top);
  397.     _TMP25 = min(_b0206, _x0206);
  398.     _TMP205 = max(_a0206, _TMP25);
  399.     _totalArea = 2.00000000E+00*_range.y;
  400.     _averageColor = ((_top - _TMP199.y)/_totalArea)*_topLeftColor;
  401.     _averageColor = _averageColor + ((_TMP205.y - _bottom)/_totalArea)*_bottomRightColor;
  402.     _averageColor = _averageColor + ((_TMP205.y - _bottom)/_totalArea)*_bottomLeftColor;
  403.     _averageColor = _averageColor + ((_top - _TMP199.y)/_totalArea)*_topRightColor;
  404.     _TMP21 = pow(_averageColor.x, 4.54545438E-01);
  405.     _TMP22 = pow(_averageColor.y, 4.54545438E-01);
  406.     _TMP23 = pow(_averageColor.z, 4.54545438E-01);
  407.     _TMP24 = pow(_averageColor.w, 4.54545438E-01);
  408.     _OUT._col = vec4(_TMP21, _TMP22, _TMP23, _TMP24);
  409.     FragColor = _OUT._col;
  410.     return;
  411. }
  412. #endif
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top